small bge edits
- Only try and remove light objects from the light list. - Only loop over mesh verts once when getting the bounding box - dont return None from python attribute localInertia when theres no physics objects. better return a vector still. - add names to send message PyArg_ParseTuple functions.
This commit is contained in:
@@ -1325,7 +1325,7 @@ PyObject* KX_GameObject::pyattr_get_localInertia(void *self_v, const KX_PYATTRIB
|
||||
{
|
||||
return PyObjectFrom(self->GetPhysicsController()->GetLocalInertia());
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
return Py_BuildValue("fff", 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
PyObject* KX_GameObject::pyattr_get_orientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
|
||||
@@ -2349,7 +2349,7 @@ KX_PYMETHODDEF_DOC_VARARGS(KX_GameObject, sendMessage,
|
||||
char* to = "";
|
||||
const STR_String& from = GetName();
|
||||
|
||||
if (!PyArg_ParseTuple(args, "s|sss", &subject, &body, &to))
|
||||
if (!PyArg_ParseTuple(args, "s|sss:sendMessage", &subject, &body, &to))
|
||||
return NULL;
|
||||
|
||||
KX_GetActiveScene()->GetNetworkScene()->SendMessage(to, from, subject, body);
|
||||
|
||||
Reference in New Issue
Block a user