diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-04-11 06:50:02 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-04-11 06:50:02 +0400 |
commit | ae9233a5b05ebfc925fd542afbdb3bb9220ed65c (patch) | |
tree | 46ed278ee54325ca98540163edf9ea5dd4a88c7f /source/gameengine/Ketsji/KX_NearSensor.cpp | |
parent | d3e88eae711e2fd5d678ed555268647e28a9fc18 (diff) |
1. Check material names passed to the physics engine (for collision sensors.)
Consider:
gameobj->getClientInfo()->m_auxilary_info = (matname ? (void*)(matname+2) : NULL);
It works if matname is "MAblah", but not if matname is "".
2. Added constructor for struct RAS_CameraData.
3. Added initializers to the struct KX_ClientObjectInfo constructor
4. Collision sensors won't detect near sensors.
5. A stack of minor tweaks, adjusting whitespace, using ++it for stl stuff.
Diffstat (limited to 'source/gameengine/Ketsji/KX_NearSensor.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_NearSensor.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source/gameengine/Ketsji/KX_NearSensor.cpp b/source/gameengine/Ketsji/KX_NearSensor.cpp index 0b32c748646..880d0d61c16 100644 --- a/source/gameengine/Ketsji/KX_NearSensor.cpp +++ b/source/gameengine/Ketsji/KX_NearSensor.cpp @@ -62,8 +62,7 @@ KX_NearSensor::KX_NearSensor(SCA_EventManager* eventmgr, m_ResetMargin(resetmargin) { - m_client_info = new KX_ClientObjectInfo(gameobj); - m_client_info->m_type = KX_ClientObjectInfo::NEAR; + m_client_info = new KX_ClientObjectInfo(gameobj, KX_ClientObjectInfo::NEAR); DT_ShapeHandle shape = (DT_ShapeHandle) vshape; m_sumoObj = new SM_Object(shape,NULL,NULL,NULL); @@ -91,9 +90,7 @@ KX_NearSensor::KX_NearSensor(SCA_EventManager* eventmgr, m_ResetMargin(resetmargin) { - m_client_info = new KX_ClientObjectInfo(gameobj); - m_client_info->m_type = KX_ClientObjectInfo::NEAR; - m_client_info->m_auxilary_info = NULL; + m_client_info = new KX_ClientObjectInfo(gameobj, KX_ClientObjectInfo::NEAR); m_sumoObj = new SM_Object(DT_NewSphere(0.0),NULL,NULL,NULL); m_sumoObj->setMargin(m_Margin); @@ -118,9 +115,7 @@ CValue* KX_NearSensor::GetReplica() // this will copy properties and so on... CValue::AddDataToReplica(replica); - replica->m_client_info = new KX_ClientObjectInfo(m_client_info->m_clientobject); - replica->m_client_info->m_type = KX_ClientObjectInfo::NEAR; - replica->m_client_info->m_auxilary_info = NULL; + replica->m_client_info = new KX_ClientObjectInfo(m_client_info->m_clientobject, KX_ClientObjectInfo::NEAR); replica->m_sumoObj = new SM_Object(DT_NewSphere(0.0),NULL,NULL,NULL); replica->m_sumoObj->setMargin(m_Margin); |