From b6e574b54e30647e7380c1389517cdd3dde73dba Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 20 Dec 2018 22:03:49 +0100 Subject: [PATCH] UPBGE: Fix keyboard sensor second modifier. Previously only the first sensor was taken into account and the second modifier always ignored. This was because the check of status[0] and status[1] only which correspond to the key and first modifier. The second modifier (status[2]) is now checked as first modifier and key. Fix issue: #965. --- source/gameengine/GameLogic/SCA_KeyboardSensor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp index cd5052be0b1d..51ad696bac2a 100644 --- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp +++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp @@ -192,7 +192,7 @@ bool SCA_KeyboardSensor::Evaluate() result = true; } - if (!status[0] || (m_qual > 0 && !status[0]) || (m_qual2 > 0 && !status[1])) { /* one of the used qualifiers are not pressed */ + if (!status[0] || (m_qual > 0 && !status[1]) || (m_qual2 > 0 && !status[2])) { /* one of the used qualifiers are not pressed */ m_val = false; /* since one of the qualifiers is not on, set the state to false */ } else {