Undo revision 23130 which was a merge with 2.5, a messy one because I did something...
[blender.git] / source / gameengine / Ketsji / KX_RadarSensor.cpp
index 76ecc2351508a0830fc2e76b9d1eef6d91a52bf6..d020a2544d2ee0c79237642ff86ddae3d7949c6d 100644 (file)
@@ -48,8 +48,7 @@ KX_RadarSensor::KX_RadarSensor(SCA_EventManager* eventmgr,
                        double margin,
                        double resetmargin,
                        bool bFindMaterial,
-                       const STR_String& touchedpropname,
-                       PyTypeObject* T)
+                       const STR_String& touchedpropname)
 
                        : KX_NearSensor(
                                eventmgr,
@@ -59,8 +58,8 @@ KX_RadarSensor::KX_RadarSensor(SCA_EventManager* eventmgr,
                                resetmargin,
                                bFindMaterial,
                                touchedpropname,
-                               physCtrl,
-                               T),
+                               physCtrl),
+
                                m_coneradius(coneradius),
                                m_coneheight(coneheight),
                                m_axis(axis)
@@ -227,13 +226,7 @@ PyObject* KX_RadarSensor::PyGetConeHeight() {
 /* Python Integration Hooks                                                  */
 /* ------------------------------------------------------------------------- */
 PyTypeObject KX_RadarSensor::Type = {
-#if (PY_VERSION_HEX >= 0x02060000)
        PyVarObject_HEAD_INIT(NULL, 0)
-#else
-       /* python 2.5 and below */
-       PyObject_HEAD_INIT( NULL )  /* required py macro */
-       0,                          /* ob_size */
-#endif
        "KX_RadarSensor",
        sizeof(PyObjectPlus_Proxy),
        0,
@@ -243,31 +236,25 @@ PyTypeObject KX_RadarSensor::Type = {
        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[] = {
-       &KX_RadarSensor::Type,
+       Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+       0,0,0,0,0,0,0,
+       Methods,
+       0,
+       0,
        &KX_NearSensor::Type,
-       &KX_TouchSensor::Type,
-       &SCA_ISensor::Type,
-       &SCA_ILogicBrick::Type,
-       &CValue::Type,
-       NULL
+       0,0,0,0,0,0,
+       py_base_new
 };
 
 PyMethodDef KX_RadarSensor::Methods[] = {
        //Deprecated ----->
        {"getConeOrigin", (PyCFunction) KX_RadarSensor::sPyGetConeOrigin, 
-        METH_VARARGS, (PY_METHODCHAR)GetConeOrigin_doc},
+        METH_VARARGS, (const char *)GetConeOrigin_doc},
        {"getConeTarget", (PyCFunction) KX_RadarSensor::sPyGetConeTarget, 
-        METH_VARARGS, (PY_METHODCHAR)GetConeTarget_doc},
+        METH_VARARGS, (const char *)GetConeTarget_doc},
        {"getConeHeight", (PyCFunction) KX_RadarSensor::sPyGetConeHeight, 
-        METH_VARARGS, (PY_METHODCHAR)GetConeHeight_doc},
+        METH_VARARGS, (const char *)GetConeHeight_doc},
         //<-----
        {NULL} //Sentinel
 };
@@ -281,16 +268,3 @@ PyAttributeDef KX_RadarSensor::Attributes[] = {
        {NULL} //Sentinel
 };
 
-PyObject* KX_RadarSensor::py_getattro(PyObject *attr)
-{
-       py_getattro_up(KX_NearSensor);
-}
-
-PyObject* KX_RadarSensor::py_getattro_dict() {
-       py_getattro_dict_up(KX_NearSensor);
-}
-
-int KX_RadarSensor::py_setattro(PyObject *attr, PyObject* value)
-{
-       py_setattro_up(KX_NearSensor);
-}