[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16338] trunk/blender/source/gameengine/ GameLogic/SCA_ISensor.cpp: BGE patch: simple fix to synchronize sensor pulse mode with sensor state transitions.
Benoit Bolsee
benoit.bolsee at online.be
Tue Sep 2 20:34:54 CEST 2008
Revision: 16338
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16338
Author: ben2610
Date: 2008-09-02 20:34:54 +0200 (Tue, 02 Sep 2008)
Log Message:
-----------
BGE patch: simple fix to synchronize sensor pulse mode with sensor state transitions.
Modified Paths:
--------------
trunk/blender/source/gameengine/GameLogic/SCA_ISensor.cpp
Modified: trunk/blender/source/gameengine/GameLogic/SCA_ISensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_ISensor.cpp 2008-09-02 17:50:54 UTC (rev 16337)
+++ trunk/blender/source/gameengine/GameLogic/SCA_ISensor.cpp 2008-09-02 18:34:54 UTC (rev 16338)
@@ -226,6 +226,9 @@
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
More information about the Bf-blender-cvs
mailing list