diff options
Diffstat (limited to 'source/gameengine/Ketsji/KX_CDActuator.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_CDActuator.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source/gameengine/Ketsji/KX_CDActuator.cpp b/source/gameengine/Ketsji/KX_CDActuator.cpp index 121d4512265..8511526fd5f 100644 --- a/source/gameengine/Ketsji/KX_CDActuator.cpp +++ b/source/gameengine/Ketsji/KX_CDActuator.cpp @@ -74,9 +74,6 @@ CValue* KX_CDActuator::GetReplica() { KX_CDActuator* replica = new KX_CDActuator(*this); replica->ProcessReplica(); - - // this will copy properties and so on... - CValue::AddDataToReplica(replica); return replica; }; @@ -158,8 +155,13 @@ bool KX_CDActuator::Update() /* Integration hooks ------------------------------------------------------- */ PyTypeObject KX_CDActuator::Type = { - PyObject_HEAD_INIT(NULL) - 0, +#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_SoundActuator", sizeof(PyObjectPlus_Proxy), 0, @@ -212,7 +214,7 @@ int KX_CDActuator::pyattr_setGain(void *self, const struct KX_PYATTRIBUTE_DEF *a { KX_CDActuator* act = static_cast<KX_CDActuator*>(self); SND_CDObject::Instance()->SetGain(act->m_gain); - return 0; + return PY_SET_ATTR_SUCCESS; } PyObject* KX_CDActuator::py_getattro(PyObject *attr) @@ -220,6 +222,10 @@ PyObject* KX_CDActuator::py_getattro(PyObject *attr) py_getattro_up(SCA_IActuator); } +PyObject* KX_CDActuator::py_getattro_dict() { + py_getattro_dict_up(SCA_IActuator); +} + int KX_CDActuator::py_setattro(PyObject *attr, PyObject *value) { py_setattro_up(SCA_IActuator); |