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
This commit is contained in:
Bruno Dilly 2012-11-28 21:47:58 +00:00
parent 1a1890fabb
commit f3946716d8
1 changed files with 5 additions and 1 deletions

View File

@ -3015,7 +3015,11 @@ _ephysics_body_boundary_add(EPhysics_World *world, EPhysics_World_Boundary bound
body->boundary = EINA_TRUE;
ephysics_body_mass_set(body, 0);
ephysics_world_boundary_set(world, boundary, body);
ephysics_body_geometry_set(body, x, y, z, w, h, d);
if ((w <= 0) || (h <= 0) || (d <= 0))
INF("Boundary added with default geometry. Render geometry not set yet");
else
ephysics_body_geometry_set(body, x, y, z, w, h, d);
return body;
}