- Exhumed: don't clear all button state when dead.

This makes it impossible to respawn.
Fixes #338
This commit is contained in:
Christoph Oelckers 2020-09-05 12:14:30 +02:00
parent 7c5635671e
commit 04dd939d65
2 changed files with 11 additions and 9 deletions

View file

@ -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;

View file

@ -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)