ephysics: don't change body properties if custom

material is set

It shouldn't imply in specific properties



SVN revision: 78134
This commit is contained in:
Bruno Dilly 2012-10-17 21:37:10 +00:00
parent 7a2e5cbdce
commit bb1ef80447
1 changed files with 6 additions and 0 deletions

View File

@ -3079,6 +3079,12 @@ ephysics_body_material_set(EPhysics_Body *body, EPhysics_Body_Material material)
return;
}
if (material == EPHYSICS_BODY_MATERIAL_CUSTOM)
{
body->material = material;
return;
}
ephysics_world_lock_take(body->world);
body->density = ephysics_material_props[material].density;
_ephysics_body_mass_set(body, 0);