diff options
Diffstat (limited to 'source/gameengine/Ketsji/KX_RadarSensor.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_RadarSensor.cpp | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/source/gameengine/Ketsji/KX_RadarSensor.cpp b/source/gameengine/Ketsji/KX_RadarSensor.cpp index fa8998cd81d..8277e7ef19c 100644 --- a/source/gameengine/Ketsji/KX_RadarSensor.cpp +++ b/source/gameengine/Ketsji/KX_RadarSensor.cpp @@ -100,8 +100,9 @@ CValue* KX_RadarSensor::GetReplica() //>m_sumoObj = new SM_Object(DT_NewCone(m_coneradius, m_coneheight),NULL,NULL,NULL); //replica->m_sumoObj->setMargin(m_Margin); //replica->m_sumoObj->setClientObject(replica->m_client_info); - - ((KX_GameObject*)replica->GetParent())->GetSGNode()->ComputeWorldTransforms(NULL); + //Wrong: see KX_TouchSensor + //bool parentUpdated = false; + //((KX_GameObject*)replica->GetParent())->GetSGNode()->ComputeWorldTransforms(NULL,parentUpdated); replica->SynchronizeTransform(); return replica; @@ -206,7 +207,7 @@ const char KX_RadarSensor::GetConeOrigin_doc[] = "getConeOrigin()\n" "\tReturns the origin of the cone with which to test. The origin\n" "\tis in the middle of the cone."; -PyObject* KX_RadarSensor::PyGetConeOrigin(PyObject* self) { +PyObject* KX_RadarSensor::PyGetConeOrigin() { ShowDeprecationWarning("getConeOrigin()", "the coneOrigin property"); PyObject *retVal = PyList_New(3); @@ -222,7 +223,7 @@ PyObject* KX_RadarSensor::PyGetConeOrigin(PyObject* self) { const char KX_RadarSensor::GetConeTarget_doc[] = "getConeTarget()\n" "\tReturns the center of the bottom face of the cone with which to test.\n"; -PyObject* KX_RadarSensor::PyGetConeTarget(PyObject* self) { +PyObject* KX_RadarSensor::PyGetConeTarget() { ShowDeprecationWarning("getConeTarget()", "the coneTarget property"); PyObject *retVal = PyList_New(3); @@ -238,7 +239,7 @@ PyObject* KX_RadarSensor::PyGetConeTarget(PyObject* self) { const char KX_RadarSensor::GetConeHeight_doc[] = "getConeHeight()\n" "\tReturns the height of the cone with which to test.\n"; -PyObject* KX_RadarSensor::PyGetConeHeight(PyObject* self) { +PyObject* KX_RadarSensor::PyGetConeHeight() { ShowDeprecationWarning("getConeHeight()", "the distance property"); @@ -250,22 +251,22 @@ PyObject* KX_RadarSensor::PyGetConeHeight(PyObject* self) { /* Python Integration Hooks */ /* ------------------------------------------------------------------------- */ PyTypeObject KX_RadarSensor::Type = { - PyObject_HEAD_INIT(&PyType_Type) + PyObject_HEAD_INIT(NULL) 0, "KX_RadarSensor", - sizeof(KX_RadarSensor), + sizeof(PyObjectPlus_Proxy), 0, - PyDestructor, + py_base_dealloc, 0, - __getattr, - __setattr, - 0, //&MyPyCompare, - __repr, - 0, //&cvalue_as_number, 0, 0, 0, - 0 + py_base_repr, + 0,0,0,0,0,0, + py_base_getattro, + py_base_setattro, + 0,0,0,0,0,0,0,0,0, + Methods }; PyParentObject KX_RadarSensor::Parents[] = { @@ -298,20 +299,12 @@ PyAttributeDef KX_RadarSensor::Attributes[] = { {NULL} //Sentinel }; -PyObject* KX_RadarSensor::_getattr(const char *attr) +PyObject* KX_RadarSensor::py_getattro(PyObject *attr) { - PyObject* object = _getattr_self(Attributes, this, attr); - if (object != NULL) - return object; - - _getattr_up(KX_NearSensor); + py_getattro_up(KX_NearSensor); } -int KX_RadarSensor::_setattr(const char *attr, PyObject* value) +int KX_RadarSensor::py_setattro(PyObject *attr, PyObject* value) { - int ret = _setattr_self(Attributes, this, attr, value); - if (ret >= 0) - return ret; - - return KX_NearSensor::_setattr(attr, value); + py_setattro_up(KX_NearSensor); } |