patch [#15865] BGE API call to delete objects
from Dalai Felinto (dfelinto) renamed deleteObject to endObject() to match the user interface.
This commit is contained in:
@@ -825,6 +825,7 @@ PyMethodDef KX_GameObject::Methods[] = {
|
||||
{"getMesh", (PyCFunction)KX_GameObject::sPyGetMesh,METH_VARARGS},
|
||||
{"getPhysicsId", (PyCFunction)KX_GameObject::sPyGetPhysicsId,METH_VARARGS},
|
||||
{"getPropertyNames", (PyCFunction)KX_GameObject::sPyGetPropertyNames,METH_VARARGS},
|
||||
{"endObject",(PyCFunction) KX_GameObject::sPyEndObject, METH_VARARGS},
|
||||
KX_PYMETHODTABLE(KX_GameObject, getDistanceTo),
|
||||
KX_PYMETHODTABLE(KX_GameObject, rayCastTo),
|
||||
KX_PYMETHODTABLE(KX_GameObject, rayCast),
|
||||
@@ -858,6 +859,18 @@ PyObject* KX_GameObject::sPySetPosition(PyObject* self,
|
||||
}
|
||||
|
||||
|
||||
PyObject* KX_GameObject::PyEndObject(PyObject* self,
|
||||
PyObject* args,
|
||||
PyObject* kwds)
|
||||
{
|
||||
|
||||
KX_Scene *scene = PHY_GetActiveScene();
|
||||
scene->DelayedRemoveObject(this);
|
||||
|
||||
return Py_None;
|
||||
|
||||
}
|
||||
|
||||
|
||||
PyObject* KX_GameObject::PyGetPosition(PyObject* self,
|
||||
PyObject* args,
|
||||
|
||||
Reference in New Issue
Block a user