diff options
author | Porteries Tristan <republicthunderbolt9@gmail.com> | 2015-08-11 22:48:06 +0300 |
---|---|---|
committer | Porteries Tristan <republicthunderbolt9@gmail.com> | 2015-08-11 22:49:54 +0300 |
commit | b36c6b9c472aeacac1edc9908e31a24180f03b3b (patch) | |
tree | 4656e25fd51422d6acc64702d9c816b98e5e9ae4 | |
parent | d22153425a516938fbe904ee3bb5a8a163a6367a (diff) |
BGE: Fix delete constraint for replicated physics controllers.
Replicated controllers didn't free constraints list before.
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsController.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp index a4858046c2a..dbaa925db08 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp @@ -820,6 +820,9 @@ void CcdPhysicsController::PostProcessReplica(class PHY_IMotionState* motionsta m_registerCount = 0; m_collisionShape = NULL; + // Clear all old constraints. + m_ccdConstraintRefs.clear(); + // always create a new shape to avoid scaling bug if (m_shapeInfo) { |