diff options
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 6c581dae210..48a45c2d1c2 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1427,8 +1427,8 @@ static unsigned char mathutils_kxgameob_vector_cb_index= -1; /* index for our ca static int mathutils_kxgameob_generic_check(BaseMathObject *bmo) { - KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); - if (self==NULL) + KX_GameObject* self = static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); + if (self == NULL) return -1; return 0; @@ -1436,8 +1436,8 @@ static int mathutils_kxgameob_generic_check(BaseMathObject *bmo) static int mathutils_kxgameob_vector_get(BaseMathObject *bmo, int subtype) { - KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); - if (self==NULL) + KX_GameObject* self = static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); + if (self == NULL) return -1; #define PHYS_ERR(attr) PyErr_SetString(PyExc_AttributeError, "KX_GameObject." attr ", is missing a physics controller") @@ -1488,8 +1488,8 @@ static int mathutils_kxgameob_vector_get(BaseMathObject *bmo, int subtype) static int mathutils_kxgameob_vector_set(BaseMathObject *bmo, int subtype) { - KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); - if (self==NULL) + KX_GameObject* self = static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); + if (self == NULL) return -1; switch (subtype) { @@ -1547,7 +1547,7 @@ static int mathutils_kxgameob_vector_set_index(BaseMathObject *bmo, int subtype, if (mathutils_kxgameob_vector_get(bmo, subtype) == -1) return -1; - bmo->data[index]= f; + bmo->data[index] = f; return mathutils_kxgameob_vector_set(bmo, subtype); } @@ -1567,8 +1567,8 @@ static unsigned char mathutils_kxgameob_matrix_cb_index= -1; /* index for our ca static int mathutils_kxgameob_matrix_get(BaseMathObject *bmo, int subtype) { - KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); - if (self==NULL) + KX_GameObject* self = static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); + if (self == NULL) return -1; switch (subtype) { @@ -1586,8 +1586,8 @@ static int mathutils_kxgameob_matrix_get(BaseMathObject *bmo, int subtype) static int mathutils_kxgameob_matrix_set(BaseMathObject *bmo, int subtype) { - KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); - if (self==NULL) + KX_GameObject* self = static_cast<KX_GameObject*>BGE_PROXY_REF(bmo->cb_user); + if (self == NULL) return -1; MT_Matrix3x3 mat3x3; @@ -1774,12 +1774,12 @@ PyObject *KX_GameObject::PyReinstancePhysicsMesh(PyObject *args) static PyObject *Map_GetItem(PyObject *self_v, PyObject *item) { - KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>BGE_PROXY_REF(self_v); const char *attr_str= _PyUnicode_AsString(item); CValue* resultattr; PyObject *pyconvert; - if (self==NULL) { + if (self == NULL) { PyErr_SetString(PyExc_SystemError, "val = gameOb[key]: KX_GameObject, "BGE_PROXY_ERROR_MSG); return NULL; } @@ -1808,12 +1808,12 @@ static PyObject *Map_GetItem(PyObject *self_v, PyObject *item) static int Map_SetItem(PyObject *self_v, PyObject *key, PyObject *val) { - KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>BGE_PROXY_REF(self_v); const char *attr_str= _PyUnicode_AsString(key); if (attr_str==NULL) PyErr_Clear(); - if (self==NULL) { + if (self == NULL) { PyErr_SetString(PyExc_SystemError, "gameOb[key] = value: KX_GameObject, "BGE_PROXY_ERROR_MSG); return -1; } @@ -1896,9 +1896,9 @@ static int Map_SetItem(PyObject *self_v, PyObject *key, PyObject *val) static int Seq_Contains(PyObject *self_v, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>BGE_PROXY_REF(self_v); - if (self==NULL) { + if (self == NULL) { PyErr_SetString(PyExc_SystemError, "val in gameOb: KX_GameObject, "BGE_PROXY_ERROR_MSG); return -1; } @@ -1962,13 +1962,13 @@ PyTypeObject KX_GameObject::Type = { PyObject *KX_GameObject::pyattr_get_name(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); return PyUnicode_From_STR_String(self->GetName()); } PyObject *KX_GameObject::pyattr_get_parent(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); KX_GameObject* parent = self->GetParent(); if (parent) { parent->Release(); /* self->GetParent() AddRef's */ @@ -1979,7 +1979,7 @@ PyObject *KX_GameObject::pyattr_get_parent(void *self_v, const KX_PYATTRIBUTE_DE PyObject *KX_GameObject::pyattr_get_group_children(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); CListValue* instances = self->GetInstanceObjects(); if (instances) { return instances->GetProxy(); @@ -2000,7 +2000,7 @@ PyObject* KX_GameObject::pyattr_get_scene(void *self_v, const KX_PYATTRIBUTE_DEF PyObject *KX_GameObject::pyattr_get_group_parent(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); KX_GameObject* pivot = self->GetDupliGroupObject(); if (pivot) { return pivot->GetProxy(); @@ -2010,7 +2010,7 @@ PyObject *KX_GameObject::pyattr_get_group_parent(void *self_v, const KX_PYATTRIB PyObject *KX_GameObject::pyattr_get_life(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); CValue *life = self->GetProperty("::timebomb"); if (life) @@ -2023,14 +2023,14 @@ PyObject *KX_GameObject::pyattr_get_life(void *self_v, const KX_PYATTRIBUTE_DEF PyObject *KX_GameObject::pyattr_get_mass(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); KX_IPhysicsController *spc = self->GetPhysicsController(); return PyFloat_FromDouble(spc ? spc->GetMass() : 0.0); } int KX_GameObject::pyattr_set_mass(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); KX_IPhysicsController *spc = self->GetPhysicsController(); MT_Scalar val = PyFloat_AsDouble(value); if (val < 0.0) { /* also accounts for non float */ @@ -2046,14 +2046,14 @@ int KX_GameObject::pyattr_set_mass(void *self_v, const KX_PYATTRIBUTE_DEF *attrd PyObject *KX_GameObject::pyattr_get_lin_vel_min(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); KX_IPhysicsController *spc = self->GetPhysicsController(); return PyFloat_FromDouble(spc ? spc->GetLinVelocityMin() : 0.0f); } int KX_GameObject::pyattr_set_lin_vel_min(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); KX_IPhysicsController *spc = self->GetPhysicsController(); MT_Scalar val = PyFloat_AsDouble(value); if (val < 0.0) { /* also accounts for non float */ @@ -2069,14 +2069,14 @@ int KX_GameObject::pyattr_set_lin_vel_min(void *self_v, const KX_PYATTRIBUTE_DEF PyObject *KX_GameObject::pyattr_get_lin_vel_max(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); KX_IPhysicsController *spc = self->GetPhysicsController(); return PyFloat_FromDouble(spc ? spc->GetLinVelocityMax() : 0.0f); } int KX_GameObject::pyattr_set_lin_vel_max(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); KX_IPhysicsController *spc = self->GetPhysicsController(); MT_Scalar val = PyFloat_AsDouble(value); if (val < 0.0) { /* also accounts for non float */ @@ -2093,13 +2093,13 @@ int KX_GameObject::pyattr_set_lin_vel_max(void *self_v, const KX_PYATTRIBUTE_DEF PyObject *KX_GameObject::pyattr_get_visible(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); return PyBool_FromLong(self->GetVisible()); } int KX_GameObject::pyattr_set_visible(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); int param = PyObject_IsTrue( value ); if (param == -1) { PyErr_SetString(PyExc_AttributeError, "gameOb.visible = bool: KX_GameObject, expected True or False"); @@ -2116,14 +2116,14 @@ PyObject *KX_GameObject::pyattr_get_worldPosition(void *self_v, const KX_PYATTRI #ifdef USE_MATHUTILS return Vector_CreatePyObject_cb(BGE_PROXY_FROM_REF(self_v), 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_POS_GLOBAL); #else - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); return PyObjectFrom(self->NodeGetWorldPosition()); #endif } int KX_GameObject::pyattr_set_worldPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); MT_Point3 pos; if (!PyVecTo(value, pos)) return PY_SET_ATTR_FAIL; @@ -2138,14 +2138,14 @@ PyObject *KX_GameObject::pyattr_get_localPosition(void *self_v, const KX_PYATTRI #ifdef USE_MATHUTILS return Vector_CreatePyObject_cb(BGE_PROXY_FROM_REF(self_v), 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_POS_LOCAL); #else - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); return PyObjectFrom(self->NodeGetLocalPosition()); #endif } int KX_GameObject::pyattr_set_localPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); MT_Point3 pos; if (!PyVecTo(value, pos)) return PY_SET_ATTR_FAIL; @@ -2160,7 +2160,7 @@ PyObject *KX_GameObject::pyattr_get_localInertia(void *self_v, const KX_PYATTRIB #ifdef USE_MATHUTILS return Vector_CreatePyObject_cb(BGE_PROXY_FROM_REF(self_v), 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_INERTIA_LOCAL); #else - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); if (self->GetPhysicsController()) return PyObjectFrom(self->GetPhysicsController()->GetLocalInertia()); return Py_BuildValue("fff", 0.0f, 0.0f, 0.0f); @@ -2172,14 +2172,14 @@ PyObject *KX_GameObject::pyattr_get_worldOrientation(void *self_v, const KX_PYAT #ifdef USE_MATHUTILS return Matrix_CreatePyObject_cb(BGE_PROXY_FROM_REF(self_v), 3, 3, mathutils_kxgameob_matrix_cb_index, MATHUTILS_MAT_CB_ORI_GLOBAL); #else - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); return PyObjectFrom(self->NodeGetWorldOrientation()); #endif } int KX_GameObject::pyattr_set_worldOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); /* if value is not a sequence PyOrientationTo makes an error */ MT_Matrix3x3 rot; @@ -2197,14 +2197,14 @@ PyObject *KX_GameObject::pyattr_get_localOrientation(void *self_v, const KX_PYAT #ifdef USE_MATHUTILS return Matrix_CreatePyObject_cb(BGE_PROXY_FROM_REF(self_v), 3, 3, mathutils_kxgameob_matrix_cb_index, MATHUTILS_MAT_CB_ORI_LOCAL); #else - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); return PyObjectFrom(self->NodeGetLocalOrientation()); #endif } int KX_GameObject::pyattr_set_localOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); /* if value is not a sequence PyOrientationTo makes an error */ MT_Matrix3x3 rot; @@ -2221,14 +2221,14 @@ PyObject *KX_GameObject::pyattr_get_worldScaling(void *self_v, const KX_PYATTRIB #ifdef USE_MATHUTILS return Vector_CreatePyObject_cb(BGE_PROXY_FROM_REF(self_v), 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_SCALE_GLOBAL); #else - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); return PyObjectFrom(self->NodeGetWorldScaling()); #endif } int KX_GameObject::pyattr_set_worldScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); MT_Vector3 scale; if (!PyVecTo(value, scale)) return PY_SET_ATTR_FAIL; @@ -2243,14 +2243,14 @@ PyObject *KX_GameObject::pyattr_get_localScaling(void *self_v, const KX_PYATTRIB #ifdef USE_MATHUTILS return Vector_CreatePyObject_cb(BGE_PROXY_FROM_REF(self_v), 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_SCALE_LOCAL); #else - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); return PyObjectFrom(self->NodeGetLocalScaling()); #endif } int KX_GameObject::pyattr_set_localScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); MT_Vector3 scale; if (!PyVecTo(value, scale)) return PY_SET_ATTR_FAIL; @@ -2345,14 +2345,14 @@ PyObject *KX_GameObject::pyattr_get_worldLinearVelocity(void *self_v, const KX_P #ifdef USE_MATHUTILS return Vector_CreatePyObject_cb(BGE_PROXY_FROM_REF(self_v), 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_LINVEL_GLOBAL); #else - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); return PyObjectFrom(GetLinearVelocity(false)); #endif } int KX_GameObject::pyattr_set_worldLinearVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); MT_Vector3 velocity; if (!PyVecTo(value, velocity)) return PY_SET_ATTR_FAIL; @@ -2367,14 +2367,14 @@ PyObject *KX_GameObject::pyattr_get_localLinearVelocity(void *self_v, const KX_P #ifdef USE_MATHUTILS return Vector_CreatePyObject_cb(BGE_PROXY_FROM_REF(self_v), 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_LINVEL_LOCAL); #else - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); return PyObjectFrom(GetLinearVelocity(true)); #endif } int KX_GameObject::pyattr_set_localLinearVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); MT_Vector3 velocity; if (!PyVecTo(value, velocity)) return PY_SET_ATTR_FAIL; @@ -2389,14 +2389,14 @@ PyObject *KX_GameObject::pyattr_get_worldAngularVelocity(void *self_v, const KX_ #ifdef USE_MATHUTILS return Vector_CreatePyObject_cb(BGE_PROXY_FROM_REF(self_v), 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_ANGVEL_GLOBAL); #else - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); return PyObjectFrom(GetAngularVelocity(false)); #endif } int KX_GameObject::pyattr_set_worldAngularVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); MT_Vector3 velocity; if (!PyVecTo(value, velocity)) return PY_SET_ATTR_FAIL; @@ -2411,14 +2411,14 @@ PyObject *KX_GameObject::pyattr_get_localAngularVelocity(void *self_v, const KX_ #ifdef USE_MATHUTILS return Vector_CreatePyObject_cb(BGE_PROXY_FROM_REF(self_v), 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_ANGVEL_LOCAL); #else - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); return PyObjectFrom(GetAngularVelocity(true)); #endif } int KX_GameObject::pyattr_set_localAngularVelocity(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); MT_Vector3 velocity; if (!PyVecTo(value, velocity)) return PY_SET_ATTR_FAIL; @@ -2431,7 +2431,7 @@ int KX_GameObject::pyattr_set_localAngularVelocity(void *self_v, const KX_PYATTR PyObject *KX_GameObject::pyattr_get_timeOffset(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); SG_Node* sg_parent; if (self->GetSGNode() && (sg_parent = self->GetSGNode()->GetSGParent()) != NULL && sg_parent->IsSlowParent()) { return PyFloat_FromDouble(static_cast<KX_SlowParentRelation *>(sg_parent->GetParentRelation())->GetTimeOffset()); @@ -2442,7 +2442,7 @@ PyObject *KX_GameObject::pyattr_get_timeOffset(void *self_v, const KX_PYATTRIBUT int KX_GameObject::pyattr_set_timeOffset(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); if (self->GetSGNode()) { MT_Scalar val = PyFloat_AsDouble(value); SG_Node *sg_parent= self->GetSGNode()->GetSGParent(); @@ -2458,7 +2458,7 @@ int KX_GameObject::pyattr_set_timeOffset(void *self_v, const KX_PYATTRIBUTE_DEF PyObject *KX_GameObject::pyattr_get_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); int state = 0; state |= self->GetState(); return PyLong_FromSsize_t(state); @@ -2466,7 +2466,7 @@ PyObject *KX_GameObject::pyattr_get_state(void *self_v, const KX_PYATTRIBUTE_DEF int KX_GameObject::pyattr_set_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); int state_i = PyLong_AsSsize_t(value); unsigned int state = 0; @@ -2486,7 +2486,7 @@ int KX_GameObject::pyattr_set_state(void *self_v, const KX_PYATTRIBUTE_DEF *attr PyObject *KX_GameObject::pyattr_get_meshes(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); PyObject *meshes= PyList_New(self->m_meshes.size()); int i; @@ -2504,14 +2504,14 @@ PyObject *KX_GameObject::pyattr_get_obcolor(void *self_v, const KX_PYATTRIBUTE_D #ifdef USE_MATHUTILS return Vector_CreatePyObject_cb(BGE_PROXY_FROM_REF(self_v), 4, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_OBJECT_COLOR); #else - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); return PyObjectFrom(self->GetObjectColor()); #endif } int KX_GameObject::pyattr_set_obcolor(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); MT_Vector4 obcolor; if (!PyVecTo(value, obcolor)) return PY_SET_ATTR_FAIL; @@ -2539,19 +2539,19 @@ PyObject *KX_GameObject::pyattr_get_actuators(void *self_v, const KX_PYATTRIBUTE PyObject *KX_GameObject::pyattr_get_children(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); return self->GetChildren()->NewProxy(true); } PyObject *KX_GameObject::pyattr_get_children_recursive(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); return self->GetChildrenRecursive()->NewProxy(true); } PyObject *KX_GameObject::pyattr_get_attrDict(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { - KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* self = static_cast<KX_GameObject*>(self_v); if (self->m_attr_dict==NULL) self->m_attr_dict= PyDict_New(); |