mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +00:00
- InputState::ClearAllInput()
: Only clear crouch_toggle
bool if outside of a level, and resend SB_CROUCH
sync bit if inside a level and crouch_toggle
is true.
* Fixes #287.
This commit is contained in:
parent
4321efa21c
commit
c076310e34
1 changed files with 16 additions and 3 deletions
|
@ -119,13 +119,26 @@ void InputState::ClearAllInput()
|
|||
{
|
||||
memset(KeyStatus, 0, sizeof(KeyStatus));
|
||||
AnyKeyStatus = false;
|
||||
ActionsToSend = 0;
|
||||
WeaponToSend = 0;
|
||||
dpad_lock = 0;
|
||||
lastCheck = 0;
|
||||
|
||||
if (gamestate != GS_LEVEL)
|
||||
{
|
||||
ActionsToSend = 0;
|
||||
crouch_toggle = false;
|
||||
buttonMap.ResetButtonStates(); // this is important. If all input is cleared, the buttons must be cleared as well.
|
||||
gi->clearlocalinputstate(); // also clear game local input state.
|
||||
}
|
||||
else if (gamestate == GS_LEVEL && crouch_toggle)
|
||||
{
|
||||
ActionsToSend |= SB_CROUCH;
|
||||
}
|
||||
else
|
||||
{
|
||||
ActionsToSend = 0;
|
||||
}
|
||||
|
||||
buttonMap.ResetButtonStates(); // this is important. If all input is cleared, the buttons must be cleared as well.
|
||||
resetTurnHeldAmt();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue