diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2005-07-29 22:14:41 +0400 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2005-07-29 22:14:41 +0400 |
commit | dad6ef9045526b6b26f845151d3ea3b26edaf4a8 (patch) | |
tree | 16625df210f25bcf20efcc251722f28934161d38 /source/gameengine/Ketsji/KX_PythonInit.cpp | |
parent | 7d797797c8f6e3eb8fd91bd42cf8e488d14b1d40 (diff) |
added physics-debugging
didn't check every single file, so might have broken some gameengine stuff, will fix it this weekend!
Diffstat (limited to 'source/gameengine/Ketsji/KX_PythonInit.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonInit.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index fedd45c65e8..63896b063ee 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -62,7 +62,7 @@ #include "KX_PyMath.h" -#include "SumoPhysicsEnvironment.h" +#include "PHY_IPhysicsEnvironment.h" // FIXME: Enable for access to blender python modules. This is disabled because // python has dependencies on a lot of other modules and is a pain to link. //#define USE_BLENDER_PYTHON @@ -227,6 +227,22 @@ static PyObject* gPySetPhysicsTicRate(PyObject*, return NULL; } +static PyObject* gPySetPhysicsDebug(PyObject*, + PyObject* args, + PyObject*) +{ + int debugMode; + if (PyArg_ParseTuple(args, "i", &debugMode)) + { + PHY_GetActiveEnvironment()->setDebugMode(debugMode); + Py_Return; + } + + return NULL; +} + + + static PyObject* gPyGetPhysicsTicRate(PyObject*, PyObject*, PyObject*) { return PyFloat_FromDouble(PHY_GetActiveEnvironment()->getFixedTimeStep()); |