BGE fix: game object to controller links consistancy maintained regardless of order...
authorBenoit Bolsee <benoit.bolsee@online.be>
Sun, 9 Mar 2008 21:51:38 +0000 (21:51 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Sun, 9 Mar 2008 21:51:38 +0000 (21:51 +0000)
commit52293831b26f34547acf100603c87296deba7a60
tree1eb228a4a0c8f09170b6cf02a8fbbe4573426a97
parent822e51bd2d663f82d360d474192718660cc9a35c
BGE fix: game object to controller links consistancy maintained regardless of order of deletion

AddObject actuator forces last created object to hang in memory even after object is removed from scene => bad link between object and physic controller that causes Blender to crash in case a python script tries to use it (bad programming anyway).
This patch avoids the crash by maintaining consistent links at all time.
source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/KX_Scene.h