BGE: Added 'ghost' arg to KX_GameObject.suspendDynamics() method
[blender.git] / source / gameengine / Ketsji / KX_GameObject.cpp
index e464883016ef6397d6d2feea0b96867d85e79713..44d9bfa0cf487c2f9de30ede99d4dce327cc02c8 100644 (file)
@@ -1907,7 +1907,7 @@ PyMethodDef KX_GameObject::Methods[] = {
        {"getReactionForce", (PyCFunction) KX_GameObject::sPyGetReactionForce, METH_NOARGS},
        {"alignAxisToVect",(PyCFunction) KX_GameObject::sPyAlignAxisToVect, METH_VARARGS},
        {"getAxisVect",(PyCFunction) KX_GameObject::sPyGetAxisVect, METH_O},
        {"getReactionForce", (PyCFunction) KX_GameObject::sPyGetReactionForce, METH_NOARGS},
        {"alignAxisToVect",(PyCFunction) KX_GameObject::sPyAlignAxisToVect, METH_VARARGS},
        {"getAxisVect",(PyCFunction) KX_GameObject::sPyGetAxisVect, METH_O},
-       {"suspendDynamics", (PyCFunction)KX_GameObject::sPySuspendDynamics,METH_NOARGS},
+       {"suspendDynamics", (PyCFunction)KX_GameObject::sPySuspendDynamics, METH_VARARGS},
        {"restoreDynamics", (PyCFunction)KX_GameObject::sPyRestoreDynamics,METH_NOARGS},
        {"enableRigidBody", (PyCFunction)KX_GameObject::sPyEnableRigidBody,METH_NOARGS},
        {"disableRigidBody", (PyCFunction)KX_GameObject::sPyDisableRigidBody,METH_NOARGS},
        {"restoreDynamics", (PyCFunction)KX_GameObject::sPyRestoreDynamics,METH_NOARGS},
        {"enableRigidBody", (PyCFunction)KX_GameObject::sPyEnableRigidBody,METH_NOARGS},
        {"disableRigidBody", (PyCFunction)KX_GameObject::sPyDisableRigidBody,METH_NOARGS},
@@ -3318,10 +3318,16 @@ PyObject *KX_GameObject::PyApplyImpulse(PyObject *args)
 
 
 
 
 
 
-PyObject *KX_GameObject::PySuspendDynamics()
+PyObject *KX_GameObject::PySuspendDynamics(PyObject *args)
 {
 {
+       bool ghost = false;
+
+       if (!PyArg_ParseTuple(args, "|b", &ghost))
+               return NULL;
+
        if (GetPhysicsController())
        if (GetPhysicsController())
-               GetPhysicsController()->SuspendDynamics();
+               GetPhysicsController()->SuspendDynamics(ghost);
+
        Py_RETURN_NONE;
 }
 
        Py_RETURN_NONE;
 }