aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/ephysics/src/lib/ephysics_constraints.cpp
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2012-08-16 21:34:44 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-08-16 21:34:44 +0000
commitebf3a282fbe01bd3cd8ff81aec7c2adc0696294a (patch)
treea46c6c489325cdc57648b7e95459cfdc9b92fbbc /legacy/ephysics/src/lib/ephysics_constraints.cpp
parentEPhysics: fix constraint angular limit type (diff)
downloadefl-ebf3a282fbe01bd3cd8ff81aec7c2adc0696294a.tar.gz
EPhysics: delete constraints if world is deleted
SVN revision: 75328
Diffstat (limited to 'legacy/ephysics/src/lib/ephysics_constraints.cpp')
-rw-r--r--legacy/ephysics/src/lib/ephysics_constraints.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/legacy/ephysics/src/lib/ephysics_constraints.cpp b/legacy/ephysics/src/lib/ephysics_constraints.cpp
index 86a2e2d01c..546ceed539 100644
--- a/legacy/ephysics/src/lib/ephysics_constraints.cpp
+++ b/legacy/ephysics/src/lib/ephysics_constraints.cpp
@@ -52,7 +52,8 @@ ephysics_constraint_slider_add(EPhysics_Body *body)
constraint->type = EPHYSICS_CONSTRAINT_SLIDER;
constraint->world = ephysics_body_world_get(body);
- ephysics_world_constraint_add(constraint->world, constraint->bt_constraint);
+ ephysics_world_constraint_add(constraint->world, constraint,
+ constraint->bt_constraint);
INF("Constraint added.");
return constraint;
@@ -228,7 +229,8 @@ ephysics_constraint_p2p_add(EPhysics_Body *body1, EPhysics_Body *body2, Evas_Coo
constraint->type = EPHYSICS_CONSTRAINT_P2P;
constraint->world = ephysics_body_world_get(body1);
- ephysics_world_constraint_add(constraint->world, constraint->bt_constraint);
+ ephysics_world_constraint_add(constraint->world, constraint,
+ constraint->bt_constraint);
INF("Constraint added.");
return constraint;
@@ -243,7 +245,8 @@ ephysics_constraint_del(EPhysics_Constraint *constraint)
return;
}
- ephysics_world_constraint_del(constraint->world, constraint->bt_constraint);
+ ephysics_world_constraint_del(constraint->world, constraint,
+ constraint->bt_constraint);
delete constraint->bt_constraint;
free(constraint);