Convert and use actuators with no target object set.
Certain actuators (Add Object/Replace Mesh/Scene/Track To) used to always require a target, or they would not influence the scene. If the actuator target is always set from Python, this could be annoying.
This commit is contained in:
@@ -263,6 +263,9 @@ PyObject* KX_SCA_AddObjectActuator::PyGetObject(PyObject* self,
|
||||
PyObject* args,
|
||||
PyObject* kwds)
|
||||
{
|
||||
if (!m_OriginalObject)
|
||||
Py_Return;
|
||||
|
||||
return PyString_FromString(m_OriginalObject->GetName());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user