Duke3d: fix issue with player movement not being locked when crushing shrunken enemies

Fixes terminx/eduke32#59.
This commit is contained in:
Richard C. Gobeille 2020-06-08 09:39:33 -07:00 committed by Christoph Oelckers
parent 5e4fd35738
commit f5aa302475

View file

@ -3020,6 +3020,12 @@ static int P_CheckLockedMovement(int const playerNum)
auto &thisPlayer = g_player[playerNum];
auto const pPlayer = thisPlayer.ps;
if ((pPlayer->dead_flag && !ud.god) || pPlayer->fist_incs || pPlayer->transporter_hold > 2 || pPlayer->hard_landing || pPlayer->access_incs > 0
|| pPlayer->knee_incs > 0
|| (PWEAPON(playerNum, pPlayer->curr_weapon, WorksLike) == TRIPBOMB_WEAPON && pPlayer->kickback_pic > 1
&& pPlayer->kickback_pic < PWEAPON(playerNum, pPlayer->curr_weapon, FireDelay)))
return IL_NOTHING;
if (pPlayer->on_crane >= 0)
return IL_NOMOVE|IL_NOANGLE;
@ -3029,12 +3035,6 @@ static int P_CheckLockedMovement(int const playerNum)
if (pPlayer->return_to_center > 0 || thisPlayer.horizRecenter)
return IL_NOHORIZ;
if ((pPlayer->dead_flag && !ud.god) || pPlayer->fist_incs || pPlayer->transporter_hold > 2 || pPlayer->hard_landing || pPlayer->access_incs > 0
|| pPlayer->knee_incs > 0
|| (PWEAPON(playerNum, pPlayer->curr_weapon, WorksLike) == TRIPBOMB_WEAPON && pPlayer->kickback_pic > 1
&& pPlayer->kickback_pic < PWEAPON(playerNum, pPlayer->curr_weapon, FireDelay)))
return IL_NOTHING;
return 0;
}