Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2005-08-22 19:47:56 +0400
committerErwin Coumans <blender@erwincoumans.com>2005-08-22 19:47:56 +0400
commit65a52fc419a990036cdf77ccb8bc724b0aefa8b5 (patch)
tree7a29645d8ae599b64fdd6419a23757e4104eaaf1 /source/gameengine/Ketsji/KX_NearSensor.cpp
parent838d9385226a550a0d6f06ad2dee92ec5dbb5e9a (diff)
- prepared for automatic game physics -> animation (ipo) conversion (this allows to use bullet for animation)
- default the m_edgecode to 65535, the wireframe was invisible. when is the edgecode available again ? - added an extra condition, nearsensor is not yet working for bullet, but it crashed.
Diffstat (limited to 'source/gameengine/Ketsji/KX_NearSensor.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_NearSensor.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_NearSensor.cpp b/source/gameengine/Ketsji/KX_NearSensor.cpp
index bd3a4fc0b37..5c6f038e23d 100644
--- a/source/gameengine/Ketsji/KX_NearSensor.cpp
+++ b/source/gameengine/Ketsji/KX_NearSensor.cpp
@@ -63,15 +63,18 @@ KX_NearSensor::KX_NearSensor(SCA_EventManager* eventmgr,
m_ResetMargin(resetmargin)
{
+
gameobj->getClientInfo()->m_sensors.remove(this);
m_client_info = new KX_ClientObjectInfo(gameobj, KX_ClientObjectInfo::NEAR);
m_client_info->m_sensors.push_back(this);
//DT_ShapeHandle shape = (DT_ShapeHandle) vshape;
m_physCtrl = ctrl;
- m_physCtrl->SetMargin(m_Margin);
- m_physCtrl->setNewClientInfo(m_client_info);
-
+ if (m_physCtrl)
+ {
+ m_physCtrl->SetMargin(m_Margin);
+ m_physCtrl->setNewClientInfo(m_client_info);
+ }
SynchronizeTransform();
}