diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-09-02 22:34:54 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-09-02 22:34:54 +0400 |
commit | 0fe906f49e259f5c2042070d2201291f32ad3223 (patch) | |
tree | c2913c29a72a9a90ded2aae72619f4dd7d6d6031 | |
parent | dcbf8fbf76bda8f6084f5317a8cdd98ab6314df3 (diff) |
BGE patch: simple fix to synchronize sensor pulse mode with sensor state transitions.
-rw-r--r-- | source/gameengine/GameLogic/SCA_ISensor.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/gameengine/GameLogic/SCA_ISensor.cpp b/source/gameengine/GameLogic/SCA_ISensor.cpp index c96eb82e29e..084b1395159 100644 --- a/source/gameengine/GameLogic/SCA_ISensor.cpp +++ b/source/gameengine/GameLogic/SCA_ISensor.cpp @@ -226,6 +226,9 @@ void SCA_ISensor::Activate(class SCA_LogicManager* logicmgr, CValue* event) bool result = this->Evaluate(event); if (result) { logicmgr->AddActivatedSensor(this); + // reset these counters so that pulse are synchronized with transition + m_pos_ticks = 0; + m_neg_ticks = 0; } else { /* First, the pulsing behaviour, if pulse mode is |