diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-10-17 13:24:35 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-10-17 13:24:35 +0400 |
commit | bf0440add886761706476b69b5355ec7d94650c2 (patch) | |
tree | 47f0813742aebb493ebdca7a17e76b166784b8aa /source/gameengine/GameLogic | |
parent | c119fb6e51b07faec288c5b20739b773f24cc748 (diff) |
BGE bug fix (continuation of previous bug fix):
- Forgot to make SCA_ISensor::UnregisterToManager() virtual to intercept active-inactive transition on collision sensor to clear colliders reference.
- Don't record collision on inactive sensor.
This situation occurs when an object with an inactive collision sensor collides with an object with an active collision sensor: the collision handler triggers both sensors.
The result of this bug was pending references that eventually cause temporary memory leak (until the sensor is reactivated).
Diffstat (limited to 'source/gameengine/GameLogic')
-rw-r--r-- | source/gameengine/GameLogic/SCA_ISensor.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/gameengine/GameLogic/SCA_ISensor.h b/source/gameengine/GameLogic/SCA_ISensor.h index 0d65270dc7b..d1872009291 100644 --- a/source/gameengine/GameLogic/SCA_ISensor.h +++ b/source/gameengine/GameLogic/SCA_ISensor.h @@ -116,8 +116,8 @@ public: /** set the level detection on or off */ void SetLevel(bool lvl); - void RegisterToManager(); - void UnregisterToManager(); + virtual void RegisterToManager(); + virtual void UnregisterToManager(); virtual float GetNumber(); |