diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-04-27 00:41:25 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-04-27 00:41:25 +0400 |
commit | bc059cb8b2b8b09553e4d02b4bcccd67ff73d8fd (patch) | |
tree | ee9bc078e5878197018e08ec609fc527bab3f6eb /source/gameengine/GameLogic/SCA_IObject.h | |
parent | c8376869b1a521c903a6f8d1be49e48c2966df70 (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.h | 3 |
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); |