Merge branch 'fix-ticcmd-received' into 'next'

Fix TICCMD_RECEIVED being overridden by gamelogic

See merge request STJr/SRB2!1337
This commit is contained in:
SteelT 2021-01-07 16:31:45 -05:00
commit da37d3c168

View file

@ -2291,14 +2291,21 @@ void G_Ticker(boolean run)
{ {
if (playeringame[i]) if (playeringame[i])
{ {
INT16 received;
G_CopyTiccmd(&players[i].cmd, &netcmds[buf][i], 1); G_CopyTiccmd(&players[i].cmd, &netcmds[buf][i], 1);
received = (players[i].cmd.angleturn & TICCMD_RECEIVED);
players[i].angleturn += players[i].cmd.angleturn - players[i].oldrelangleturn; players[i].angleturn += players[i].cmd.angleturn - players[i].oldrelangleturn;
players[i].oldrelangleturn = players[i].cmd.angleturn; players[i].oldrelangleturn = players[i].cmd.angleturn;
if (P_ControlStyle(&players[i]) == CS_LMAOGALOG) if (P_ControlStyle(&players[i]) == CS_LMAOGALOG)
P_ForceLocalAngle(&players[i], players[i].angleturn << 16); P_ForceLocalAngle(&players[i], players[i].angleturn << 16);
else else
players[i].cmd.angleturn = players[i].angleturn; players[i].cmd.angleturn = players[i].angleturn;
players[i].cmd.angleturn &= ~TICCMD_RECEIVED;
players[i].cmd.angleturn |= received;
} }
} }