svn merge -r 21041:21301 https://svn.blender.org/svnroot/bf-blender/branches/blender2...
[blender.git] / source / gameengine / Ketsji / KX_NearSensor.cpp
index 44842b7f5b3dacb2936455072b9ab4b80b69ce32..1a211a64b35ff87ed683c0b8e994233902475c97 100644 (file)
@@ -48,15 +48,13 @@ KX_NearSensor::KX_NearSensor(SCA_EventManager* eventmgr,
                                                         bool bFindMaterial,
                                                         const STR_String& touchedpropname,
                                                         class KX_Scene* scene,
-                                                        PHY_IPhysicsController*        ctrl,
-                                                        PyTypeObject* T)
+                                                        PHY_IPhysicsController* ctrl)
                         :KX_TouchSensor(eventmgr,
                                                         gameobj,
                                                         bFindMaterial,
                                                         false,
-                                                        touchedpropname,
-                                                        /* scene, */
-                                                        T),
+                                                        touchedpropname
+                                                        /*, scene */),
                         m_Margin(margin),
                         m_ResetMargin(resetmargin)
 
@@ -272,26 +270,17 @@ PyTypeObject KX_NearSensor::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_NearSensor::Parents[] = {
-       &KX_NearSensor::Type,
+       Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+       0,0,0,0,0,0,0,
+       Methods,
+       0,
+       0,
        &KX_TouchSensor::Type,
-       &SCA_ISensor::Type,
-       &SCA_ILogicBrick::Type,
-       &CValue::Type,
-       NULL
+       0,0,0,0,0,0,
+       py_base_new
 };
 
-
-
 PyMethodDef KX_NearSensor::Methods[] = {
        //No methods
        {NULL,NULL} //Sentinel
@@ -302,18 +291,3 @@ PyAttributeDef KX_NearSensor::Attributes[] = {
        KX_PYATTRIBUTE_FLOAT_RW_CHECK("resetDistance", 0, 100, KX_NearSensor, m_ResetMargin, CheckResetDistance),
        {NULL} //Sentinel
 };
-
-
-PyObject* KX_NearSensor::py_getattro(PyObject *attr)
-{
-       py_getattro_up(KX_TouchSensor);
-}
-
-PyObject* KX_NearSensor::py_getattro_dict() {
-       py_getattro_dict_up(KX_TouchSensor);
-}
-
-int KX_NearSensor::py_setattro(PyObject*attr, PyObject* value)
-{
-       py_setattro_up(KX_TouchSensor);
-}