diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-06-04 07:00:13 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-06-04 07:00:13 +0400 |
commit | 44f45894c2fca8f7e0b7bbfff0e50f24e6c993a5 (patch) | |
tree | 740e361ce3f2fb47885348bed9b0ff5cd537a9ad /source/gameengine/Ketsji | |
parent | 4ff321d50773166712a611233437c7b19183087c (diff) |
Miscellaneous Fixes:
Add Python Mapping method to CListValue
Fix Bernoulli bool distribution python method for random actuator
Fix Python IpoActuator methods setProperty and force acts local
Make data objects private
Better sort method for polygon materials - much easier to understand
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_CameraActuator.h | 4 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_ConstraintActuator.h | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_GameActuator.h | 1 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_IpoActuator.cpp | 6 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_IpoActuator.h | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_RadarSensor.cpp | 23 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_RadarSensor.h | 1 |
7 files changed, 34 insertions, 5 deletions
diff --git a/source/gameengine/Ketsji/KX_CameraActuator.h b/source/gameengine/Ketsji/KX_CameraActuator.h index 21d4af64135..cb061206a21 100644 --- a/source/gameengine/Ketsji/KX_CameraActuator.h +++ b/source/gameengine/Ketsji/KX_CameraActuator.h @@ -48,10 +48,8 @@ class KX_CameraActuator : public SCA_IActuator { - -private : Py_Header; - +private : /** Object that will be tracked. */ const CValue *m_ob; diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.h b/source/gameengine/Ketsji/KX_ConstraintActuator.h index 800a1ae10fb..c1c58b3b664 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.h +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.h @@ -41,7 +41,7 @@ class KX_ConstraintActuator : public SCA_IActuator { Py_Header; - +protected: // Damp time (int), int m_dampTime; // min (float), diff --git a/source/gameengine/Ketsji/KX_GameActuator.h b/source/gameengine/Ketsji/KX_GameActuator.h index b3acd3b7400..19908a37e54 100644 --- a/source/gameengine/Ketsji/KX_GameActuator.h +++ b/source/gameengine/Ketsji/KX_GameActuator.h @@ -41,6 +41,7 @@ class KX_GameActuator : public SCA_IActuator { Py_Header; +protected: int m_mode; bool m_restart; STR_String m_filename; diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp index 6d2b8dc49eb..7a894db6647 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.cpp +++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp @@ -428,6 +428,10 @@ PyMethodDef KX_IpoActuator::Methods[] = { METH_VARARGS, SetType_doc}, {"getType", (PyCFunction) KX_IpoActuator::sPyGetType, METH_VARARGS, GetType_doc}, + {"setForceIpoActsLocal", (PyCFunction) KX_IpoActuator::sPySetForceIpoActsLocal, + METH_VARARGS, SetForceIpoActsLocal_doc}, + {"getForceIpoActsLocal", (PyCFunction) KX_IpoActuator::sPyGetForceIpoActsLocal, + METH_VARARGS, GetForceIpoActsLocal_doc}, {NULL,NULL} //Sentinel }; @@ -494,6 +498,8 @@ PyObject* KX_IpoActuator::PySetProperty(PyObject* self, return NULL; } + m_propname = propertyName; + Py_Return; } diff --git a/source/gameengine/Ketsji/KX_IpoActuator.h b/source/gameengine/Ketsji/KX_IpoActuator.h index 49c06a74ece..e2f877c7f7c 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.h +++ b/source/gameengine/Ketsji/KX_IpoActuator.h @@ -40,7 +40,7 @@ class KX_IpoActuator : public SCA_IActuator { Py_Header; - +protected: bool m_bNegativeEvent; /** Begin frame of the ipo. */ diff --git a/source/gameengine/Ketsji/KX_RadarSensor.cpp b/source/gameengine/Ketsji/KX_RadarSensor.cpp index d167349789c..798ebdfc944 100644 --- a/source/gameengine/Ketsji/KX_RadarSensor.cpp +++ b/source/gameengine/Ketsji/KX_RadarSensor.cpp @@ -77,6 +77,29 @@ KX_RadarSensor::~KX_RadarSensor() } +CValue* KX_RadarSensor::GetReplica() +{ + KX_RadarSensor* replica = new KX_RadarSensor(*this); + replica->m_colliders = new CListValue(); + replica->m_bCollision = false; + replica->m_bTriggered= false; + replica->m_hitObject = NULL; + replica->m_bLastTriggered = false; + // this will copy properties and so on... + CValue::AddDataToReplica(replica); + + replica->m_client_info = new KX_ClientObjectInfo(m_client_info->m_clientobject, KX_ClientObjectInfo::RADAR); + + replica->m_sumoObj = new SM_Object(DT_NewCone(m_coneradius, m_coneheight),NULL,NULL,NULL); + replica->m_sumoObj->setMargin(m_Margin); + replica->m_sumoObj->setClientObject(replica->m_client_info); + + replica->SynchronizeTransform(); + + return replica; +} + + /** * Transforms the collision object. A cone is not correctly centered * for usage. */ diff --git a/source/gameengine/Ketsji/KX_RadarSensor.h b/source/gameengine/Ketsji/KX_RadarSensor.h index 055041f749c..0e055357f18 100644 --- a/source/gameengine/Ketsji/KX_RadarSensor.h +++ b/source/gameengine/Ketsji/KX_RadarSensor.h @@ -77,6 +77,7 @@ public: KX_RadarSensor(); virtual ~KX_RadarSensor(); virtual void SynchronizeTransform(); + virtual CValue* GetReplica(); /* --------------------------------------------------------------------- */ /* Python interface ---------------------------------------------------- */ |