Revision: 16971 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16971 Author: campbellbarton Date: 2008-10-08 13:40:39 +0200 (Wed, 08 Oct 2008)
Log Message: ----------- my changes broke the "level" option for joystick keys being held between states Modified Paths: -------------- trunk/blender/source/gameengine/GameLogic/SCA_JoystickSensor.cpp Modified: trunk/blender/source/gameengine/GameLogic/SCA_JoystickSensor.cpp =================================================================== --- trunk/blender/source/gameengine/GameLogic/SCA_JoystickSensor.cpp 2008-10-08 09:27:26 UTC (rev 16970) +++ trunk/blender/source/gameengine/GameLogic/SCA_JoystickSensor.cpp 2008-10-08 11:40:39 UTC (rev 16971) @@ -123,8 +123,8 @@ numberof== m_axis -- max 2 */ - if (!js->IsTrigAxis()) /* No events from SDL? - dont bother */ - return reset ? true : false; + if (!js->IsTrigAxis() && !reset) /* No events from SDL? - dont bother */ + return false; js->cSetPrecision(m_precision); if (m_bAllEvents) { @@ -189,8 +189,8 @@ /* what is what! m_button = the actual button in question */ - if (!js->IsTrigButton()) /* No events from SDL? - dont bother */ - return reset ? true : false; + if (!js->IsTrigButton() && !reset) /* No events from SDL? - dont bother */ + return false; if(( m_bAllEvents && js->aAnyButtonPressIsPositive()) || (!m_bAllEvents && js->aButtonPressIsPositive(m_button))) { m_istrig = 1; @@ -210,8 +210,8 @@ direction= m_hatf -- max 12 */ - if (!js->IsTrigHat()) /* No events from SDL? - dont bother */ - return reset ? true : false; + if (!js->IsTrigHat() && !reset) /* No events from SDL? - dont bother */ + return false; if(m_hat == 1){ if(js->aHatIsPositive(m_hatf)){ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs