diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-02-26 08:17:54 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-02-26 08:17:54 +0300 |
commit | 936a6eeda87bfd36ada735e5edac06f161a5de25 (patch) | |
tree | 17dc1f385218fe9c00f65ac113aba4f2c451e254 /source/gameengine/Ketsji | |
parent | f87194820bdd20540203a7bb6b91e1932f9ebd16 (diff) |
small errors in touch sensor and gameObject
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_TouchSensor.cpp | 11 |
2 files changed, 3 insertions, 10 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 5e013a1c647..9c6bd2edf0e 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1170,7 +1170,7 @@ int KX_GameObject::_setattr(const char *attr, PyObject *value) // _setattr metho { if (!strcmp(attr, "parent")) { - PyErr_SetString(PyExc_AttributeError, "attribute \"mass\" is read only\nUse setParent()"); + PyErr_SetString(PyExc_AttributeError, "attribute \"parent\" is read only\nUse setParent()"); return 1; } diff --git a/source/gameengine/Ketsji/KX_TouchSensor.cpp b/source/gameengine/Ketsji/KX_TouchSensor.cpp index de4b5c401fc..32fcc148395 100644 --- a/source/gameengine/Ketsji/KX_TouchSensor.cpp +++ b/source/gameengine/Ketsji/KX_TouchSensor.cpp @@ -284,6 +284,8 @@ 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_BOOL_RW("pulseCollisions",KX_TouchSensor,m_bTouchPulse), + KX_PYATTRIBUTE_DUMMY("objectHit"), + KX_PYATTRIBUTE_DUMMY("objectHitList"), { NULL } //Sentinel }; @@ -309,15 +311,6 @@ int KX_TouchSensor::_setattr(const char *attr, PyObject *value) if (ret >= 0) return ret; - if (!strcmp(attr, "objectHit")) { - PyErr_SetString(PyExc_AttributeError, "attribute \"objectHit\" is read only"); - return 1; - } - if (!strcmp(attr, "objectHitList")) { - PyErr_SetString(PyExc_AttributeError, "attribute \"objectHit\" is read only"); - return 1; - } - return SCA_ISensor::_setattr(attr, value); } |