added physics-debugging

didn't check every single file, so might have broken some gameengine stuff, will fix it this weekend!
This commit is contained in:
2005-07-29 18:14:41 +00:00
parent 7d797797c8
commit dad6ef9045
32 changed files with 341 additions and 166 deletions

View File

@@ -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());