BGE API cleanup: apply patch from Moguri: Near, Radar, Touch sensor updated.
[blender.git] / source / gameengine / Ketsji / KX_TouchSensor.cpp
index 32fcc148395ab3c750534c222aad942ef90a3621..705b54edd3784dfd17c5b0c6e0188b99b755fa54 100644 (file)
@@ -269,6 +269,7 @@ PyParentObject KX_TouchSensor::Parents[] = {
 };
 
 PyMethodDef KX_TouchSensor::Methods[] = {
+       //Deprecated ----->
        {"setProperty", 
         (PyCFunction) KX_TouchSensor::sPySetProperty,      METH_O, (PY_METHODCHAR)SetProperty_doc},
        {"getProperty", 
@@ -277,12 +278,13 @@ PyMethodDef KX_TouchSensor::Methods[] = {
         (PyCFunction) KX_TouchSensor::sPyGetHitObject,     METH_NOARGS, (PY_METHODCHAR)GetHitObject_doc},
        {"getHitObjectList", 
         (PyCFunction) KX_TouchSensor::sPyGetHitObjectList, METH_NOARGS, (PY_METHODCHAR)GetHitObjectList_doc},
+        //<-----
        {NULL,NULL} //Sentinel
 };
 
 PyAttributeDef KX_TouchSensor::Attributes[] = {
-       KX_PYATTRIBUTE_STRING_RW("propertyName",0,100,false,KX_TouchSensor,m_touchedpropname),
-       KX_PYATTRIBUTE_BOOL_RW("materialCheck",KX_TouchSensor,m_bFindMaterial),
+       KX_PYATTRIBUTE_STRING_RW("property",0,100,false,KX_TouchSensor,m_touchedpropname),
+       KX_PYATTRIBUTE_BOOL_RW("useMaterial",KX_TouchSensor,m_bFindMaterial),
        KX_PYATTRIBUTE_BOOL_RW("pulseCollisions",KX_TouchSensor,m_bTouchPulse),
        KX_PYATTRIBUTE_DUMMY("objectHit"),
        KX_PYATTRIBUTE_DUMMY("objectHitList"),
@@ -372,6 +374,9 @@ PyObject* KX_TouchSensor::PyGetHitObjectList(PyObject* self)
        return m_colliders->AddRef();
 }
 
+/*getTouchMaterial and setTouchMaterial were never added to the api,
+they can probably be removed with out anyone noticing*/
+
 /* 5. getTouchMaterial */
 const char KX_TouchSensor::GetTouchMaterial_doc[] = 
 "getTouchMaterial()\n"