summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2012-11-28 21:47:58 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-11-28 21:47:58 +0000
commitf3946716d8b4806b4dcf22cb6d35f3bccd06750f (patch)
treeca8966372f0499d46123e5050745d8054fd7f2b7 /legacy
parent1a1890fabb559afbc693043f8ef782ec0b30f256 (diff)
ephysics: don't try to set bad body geometry when adding
boundaries If render geometry is not set yet, it will try to set a bad geometry for the boundary boxes. In this case, let these bodies with default size and only resize them when render geometry is set. SVN revision: 79791
Diffstat (limited to '')
-rw-r--r--legacy/ephysics/src/lib/ephysics_body.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/legacy/ephysics/src/lib/ephysics_body.cpp b/legacy/ephysics/src/lib/ephysics_body.cpp
index 25f86ab35c..1a92b2e293 100644
--- a/legacy/ephysics/src/lib/ephysics_body.cpp
+++ b/legacy/ephysics/src/lib/ephysics_body.cpp
@@ -3015,7 +3015,11 @@ _ephysics_body_boundary_add(EPhysics_World *world, EPhysics_World_Boundary bound
3015 body->boundary = EINA_TRUE; 3015 body->boundary = EINA_TRUE;
3016 ephysics_body_mass_set(body, 0); 3016 ephysics_body_mass_set(body, 0);
3017 ephysics_world_boundary_set(world, boundary, body); 3017 ephysics_world_boundary_set(world, boundary, body);
3018 ephysics_body_geometry_set(body, x, y, z, w, h, d); 3018
3019 if ((w <= 0) || (h <= 0) || (d <= 0))
3020 INF("Boundary added with default geometry. Render geometry not set yet");
3021 else
3022 ephysics_body_geometry_set(body, x, y, z, w, h, d);
3019 3023
3020 return body; 3024 return body;
3021} 3025}