mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 11:40:44 +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;
|
||||
crouch_toggle = false;
|
||||
|
||||
if (gamestate != GS_LEVEL)
|
||||
{
|
||||
ActionsToSend = 0;
|
||||
crouch_toggle = false;
|
||||
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.
|
||||
gi->clearlocalinputstate(); // also clear game local input state.
|
||||
resetTurnHeldAmt();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue