mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-15 04:00:53 +00:00
- Exhumed: Fixed issues with call to playerProcessHelpers()
not occurring after dying.
This commit is contained in:
parent
a4438fd218
commit
f0262039b6
2 changed files with 8 additions and 5 deletions
|
@ -94,14 +94,13 @@ void CheckKeys2()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void processMovement(ControlInfo* const hidInput)
|
static void processMovement(ControlInfo* const hidInput, double const scaleAdjust)
|
||||||
{
|
{
|
||||||
// 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;
|
||||||
int const keyMove = playerRunning ? 12 : 6;
|
int const keyMove = playerRunning ? 12 : 6;
|
||||||
bool const mouseaim = !(localInput.actions & SB_AIMMODE);
|
bool const mouseaim = !(localInput.actions & SB_AIMMODE);
|
||||||
double const scaleAdjust = InputScale();
|
|
||||||
InputPacket tempinput {};
|
InputPacket tempinput {};
|
||||||
|
|
||||||
if (buttonMap.ButtonDown(gamefunc_Strafe))
|
if (buttonMap.ButtonDown(gamefunc_Strafe))
|
||||||
|
@ -200,8 +199,6 @@ static void processMovement(ControlInfo* const hidInput)
|
||||||
sethorizon(&pPlayer->q16horiz, tempinput.q16horz, &sPlayerInput[nLocalPlayer].actions, scaleAdjust);
|
sethorizon(&pPlayer->q16horiz, tempinput.q16horz, &sPlayerInput[nLocalPlayer].actions, scaleAdjust);
|
||||||
UpdatePlayerSpriteAngle(pPlayer);
|
UpdatePlayerSpriteAngle(pPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
playerProcessHelpers(&pPlayer->q16angle, &pPlayer->angAdjust, &pPlayer->angTarget, &pPlayer->q16horiz, &pPlayer->horizAdjust, &pPlayer->horizTarget, scaleAdjust);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,6 +218,10 @@ void GameInterface::GetInput(InputPacket* packet, ControlInfo* const hidInput)
|
||||||
if (PlayerList[nLocalPlayer].nHealth == 0) localInput.actions &= SB_OPEN;
|
if (PlayerList[nLocalPlayer].nHealth == 0) localInput.actions &= SB_OPEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double const scaleAdjust = InputScale();
|
||||||
|
Player* pPlayer = &PlayerList[nLocalPlayer];
|
||||||
|
playerProcessHelpers(&pPlayer->q16angle, &pPlayer->angAdjust, &pPlayer->angTarget, &pPlayer->q16horiz, &pPlayer->horizAdjust, &pPlayer->horizTarget, scaleAdjust);
|
||||||
|
|
||||||
if (PlayerList[nLocalPlayer].nHealth == 0)
|
if (PlayerList[nLocalPlayer].nHealth == 0)
|
||||||
{
|
{
|
||||||
lPlayerYVel = 0;
|
lPlayerYVel = 0;
|
||||||
|
@ -228,7 +229,7 @@ void GameInterface::GetInput(InputPacket* packet, ControlInfo* const hidInput)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
processMovement(hidInput);
|
processMovement(hidInput, scaleAdjust);
|
||||||
if (packet) *packet = localInput;
|
if (packet) *packet = localInput;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -725,6 +725,8 @@ void FuncPlayer(int a, int nDamage, int nRun)
|
||||||
|
|
||||||
short nSprite2;
|
short nSprite2;
|
||||||
|
|
||||||
|
PlayerList[nPlayer].angAdjust = 0;
|
||||||
|
PlayerList[nPlayer].horizAdjust = 0;
|
||||||
PlayerList[nPlayer].opos = sprite[nPlayerSprite].pos;
|
PlayerList[nPlayer].opos = sprite[nPlayerSprite].pos;
|
||||||
PlayerList[nPlayer].oq16angle = PlayerList[nPlayer].q16angle;
|
PlayerList[nPlayer].oq16angle = PlayerList[nPlayer].q16angle;
|
||||||
PlayerList[nPlayer].oq16horiz = PlayerList[nPlayer].q16horiz;
|
PlayerList[nPlayer].oq16horiz = PlayerList[nPlayer].q16horiz;
|
||||||
|
|
Loading…
Reference in a new issue