Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2012-08-06 02:31:55 +0400
committerMitchell Stokes <mogurijin@gmail.com>2012-08-06 02:31:55 +0400
commit958dc02774b104123c6124a9185815dfe389a529 (patch)
treebade9ef46b9993e1aeed13337d37e562992da069 /source/gameengine
parentf8a68d50f7f5c53e0d8f16e0f5553a8e5b5b9c6c (diff)
Fix for [#32270] "Removing a Character object from the scene causes a crash." reported by me. The character's action wasn't being removed from the dynamics world when the character controller was.
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
index 79898cdc0d4..5d28bf47401 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
@@ -451,6 +451,11 @@ bool CcdPhysicsEnvironment::removeCcdPhysicsController(CcdPhysicsController* ctr
} else
{
m_dynamicsWorld->removeCollisionObject(ctrl->GetCollisionObject());
+
+ if (ctrl->GetCharacterController())
+ {
+ m_dynamicsWorld->removeAction(ctrl->GetCharacterController());
+ }
}
}
if (ctrl->m_registerCount != 0)