BGE bugfix, ipo actuator's foce option didnt check that the object was dynamic.
authorCampbell Barton <ideasman42@gmail.com>
Wed, 27 Aug 2008 06:02:10 +0000 (06:02 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 27 Aug 2008 06:02:10 +0000 (06:02 +0000)
source/blender/src/buttons_logic.c
source/gameengine/Ketsji/KX_IPO_SGController.cpp

index 78bab43a3c1b78ec8b52786a0fcbd348e37c9027..b7ce16f50a6eac8acdd6c3254fc59e2904a75a59 100644 (file)
@@ -1857,7 +1857,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh
                        but = uiDefButBitS(block, TOG, ACT_IPOFORCE, ACT_IPOFORCE, 
                                "Force", xco+10+(width-20)/2, yco-24, (width-20)/4-10, 19, 
                                &ia->flag, 0, 0, 0, 0, 
-                               "Convert Ipo to force. Force is applied in global or local coordinate according to Local flag"); 
+                               "Apply Ipo as a global or local force depending on the local option (dynamic objects only)"); 
                        uiButSetFunc(but, change_ipo_actuator, but, ia);
 
                        but = uiDefButBitS(block, TOG, ACT_IPOADD, ACT_IPOADD, 
index d3aa924665e6531574a741623b3f7b2ff1c1c2bb..6223643f75a6e6082ebd295a21c80b7291f88b79 100644 (file)
@@ -143,7 +143,7 @@ bool KX_IpoSGController::Update(double currentTime)
                {
                        if (m_ipo_as_force == true) 
                        {
-                               if (m_game_object && ob) 
+                               if (m_game_object && ob && m_game_object->GetPhysicsController()
                                {
                                        m_game_object->GetPhysicsController()->ApplyForce(m_ipo_local ?
                                                ob->GetWorldOrientation() * m_ipo_xform.GetPosition() :