diff options
author | Andre Susano Pinto <andresusanopinto@gmail.com> | 2009-04-10 20:45:19 +0400 |
---|---|---|
committer | Andre Susano Pinto <andresusanopinto@gmail.com> | 2009-04-10 20:45:19 +0400 |
commit | 2fff90bbb4a922f454c15dbf2d6215bd4d8c519c (patch) | |
tree | dfc2955a85c8f0fe61eaa9716eee8f6341c1197b /source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp | |
parent | a412ce0702101628ac827d53465354c05fed7927 (diff) |
Added function name to many of the PyArg_ParseTuple calls in gameengine
This way python raises more useful messages.
Diffstat (limited to 'source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp index 3bef85e7f93..9da86193622 100644 --- a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp +++ b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp @@ -56,7 +56,7 @@ PyObject* KX_PhysicsObjectWrapper::PySetPosition(PyObject* self, PyObject* kwds) { float x,y,z; - if (PyArg_ParseTuple(args,"fff",&x,&y,&z)) + if (PyArg_ParseTuple(args,"fff:setPosition",&x,&y,&z)) { m_ctrl->setPosition(x,y,z); } @@ -73,7 +73,7 @@ PyObject* KX_PhysicsObjectWrapper::PySetLinearVelocity(PyObject* self, { float x,y,z; int local; - if (PyArg_ParseTuple(args,"fffi",&x,&y,&z,&local)) + if (PyArg_ParseTuple(args,"fffi:setLinearVelocity",&x,&y,&z,&local)) { m_ctrl->SetLinearVelocity(x,y,z,local != 0); } @@ -89,7 +89,7 @@ PyObject* KX_PhysicsObjectWrapper::PySetAngularVelocity(PyObject* self, { float x,y,z; int local; - if (PyArg_ParseTuple(args,"fffi",&x,&y,&z,&local)) + if (PyArg_ParseTuple(args,"fffi:setAngularVelocity",&x,&y,&z,&local)) { m_ctrl->SetAngularVelocity(x,y,z,local != 0); } @@ -104,7 +104,7 @@ PyObject* KX_PhysicsObjectWrapper::PySetActive(PyObject* self, PyObject* kwds) { int active; - if (PyArg_ParseTuple(args,"i",&active)) + if (PyArg_ParseTuple(args,"i:setActive",&active)) { m_ctrl->SetActive(active!=0); } |