mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-15 20:20:54 +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{};
|
InputPacket tempinput{};
|
||||||
fixed_t input_angle = 0;
|
fixed_t input_angle = 0;
|
||||||
|
|
||||||
if (PlayerList[nLocalPlayer].nHealth == 0)
|
if (!after)
|
||||||
{
|
{
|
||||||
localInput = {};
|
localInput = {};
|
||||||
|
ApplyGlobalInput(localInput, &info);
|
||||||
|
if (PlayerList[nLocalPlayer].nHealth == 0) localInput.actions &= SB_OPEN;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PlayerList[nLocalPlayer].nHealth == 0)
|
||||||
|
{
|
||||||
lPlayerYVel = 0;
|
lPlayerYVel = 0;
|
||||||
lPlayerXVel = 0;
|
lPlayerXVel = 0;
|
||||||
nPlayerDAng = 0;
|
nPlayerDAng = 0;
|
||||||
return;
|
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
|
// JBF: Run key behaviour is selectable
|
||||||
int const playerRunning = !!(localInput.actions & SB_RUN);
|
int const playerRunning = !!(localInput.actions & SB_RUN);
|
||||||
int const turnAmount = playerRunning ? 12 : 8;
|
int const turnAmount = playerRunning ? 12 : 8;
|
||||||
|
|
|
@ -1280,6 +1280,10 @@ loc_1AB8E:
|
||||||
|
|
||||||
uint16_t buttons = sPlayerInput[nPlayer].buttons;
|
uint16_t buttons = sPlayerInput[nPlayer].buttons;
|
||||||
auto actions = sPlayerInput[nPlayer].actions;
|
auto actions = sPlayerInput[nPlayer].actions;
|
||||||
|
if (actions & SB_OPEN)
|
||||||
|
{
|
||||||
|
int a = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// loc_1AEF5:
|
// loc_1AEF5:
|
||||||
if (PlayerList[nPlayer].nHealth > 0)
|
if (PlayerList[nPlayer].nHealth > 0)
|
||||||
|
|
Loading…
Reference in a new issue