mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- Exhumed: don't clear all button state when dead.
This makes it impossible to respawn. Fixes #338
This commit is contained in:
parent
7c5635671e
commit
04dd939d65
2 changed files with 11 additions and 9 deletions
|
@ -120,23 +120,21 @@ void PlayerInterruptKeys(bool after)
|
|||
InputPacket tempinput{};
|
||||
fixed_t input_angle = 0;
|
||||
|
||||
if (PlayerList[nLocalPlayer].nHealth == 0)
|
||||
if (!after)
|
||||
{
|
||||
localInput = {};
|
||||
ApplyGlobalInput(localInput, &info);
|
||||
if (PlayerList[nLocalPlayer].nHealth == 0) localInput.actions &= SB_OPEN;
|
||||
}
|
||||
|
||||
if (PlayerList[nLocalPlayer].nHealth == 0)
|
||||
{
|
||||
lPlayerYVel = 0;
|
||||
lPlayerXVel = 0;
|
||||
nPlayerDAng = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!after)
|
||||
{
|
||||
localInput = {};
|
||||
ApplyGlobalInput(localInput, &info);
|
||||
if (PlayerList[nLocalPlayer].nHealth == 0) localInput.actions &= ~(SB_FIRE | SB_JUMP | SB_CROUCH);
|
||||
}
|
||||
|
||||
|
||||
// JBF: Run key behaviour is selectable
|
||||
int const playerRunning = !!(localInput.actions & SB_RUN);
|
||||
int const turnAmount = playerRunning ? 12 : 8;
|
||||
|
|
|
@ -1280,6 +1280,10 @@ loc_1AB8E:
|
|||
|
||||
uint16_t buttons = sPlayerInput[nPlayer].buttons;
|
||||
auto actions = sPlayerInput[nPlayer].actions;
|
||||
if (actions & SB_OPEN)
|
||||
{
|
||||
int a = 0;
|
||||
}
|
||||
|
||||
// loc_1AEF5:
|
||||
if (PlayerList[nPlayer].nHealth > 0)
|
||||
|
|
Loading…
Reference in a new issue