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:
authorBenoit Bolsee <benoit.bolsee@online.be>2008-04-27 00:41:25 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2008-04-27 00:41:25 +0400
commitbc059cb8b2b8b09553e4d02b4bcccd67ff73d8fd (patch)
treeee9bc078e5878197018e08ec609fc527bab3f6eb /source/gameengine/GameLogic/SCA_IObject.h
parentc8376869b1a521c903a6f8d1be49e48c2966df70 (diff)
BGE bug: crash when an object being tracked-to is deleted (bad practice anyway). Fix by creating a generic cross reference between actuators (only TrackTo uses it at the moment) and objects so that the actuator is informed when the target object is deleted
Diffstat (limited to 'source/gameengine/GameLogic/SCA_IObject.h')
-rw-r--r--source/gameengine/GameLogic/SCA_IObject.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/gameengine/GameLogic/SCA_IObject.h b/source/gameengine/GameLogic/SCA_IObject.h
index 8f3e25afa03..4b0fc741b8f 100644
--- a/source/gameengine/GameLogic/SCA_IObject.h
+++ b/source/gameengine/GameLogic/SCA_IObject.h
@@ -55,6 +55,7 @@ protected:
SCA_SensorList m_sensors;
SCA_ControllerList m_controllers;
SCA_ActuatorList m_actuators;
+ SCA_ActuatorList m_registeredActuators; // actuators that use a pointer to this object
static class MT_Point3 m_sDummy;
/**
@@ -79,6 +80,8 @@ public:
void AddSensor(SCA_ISensor* act);
void AddController(SCA_IController* act);
void AddActuator(SCA_IActuator* act);
+ void RegisterActuator(SCA_IActuator* act);
+ void UnregisterActuator(SCA_IActuator* act);
SCA_ISensor* FindSensor(const STR_String& sensorname);
SCA_IActuator* FindActuator(const STR_String& actuatorname);