RR: fix issue where the player was unable to look or move under some circumstances after being "killed" with god mode enabled

Replicates changes to Duke3D code from 5e4fd35738.
This commit is contained in:
Richard C. Gobeille 2020-06-17 21:44:21 +10:00 committed by Christoph Oelckers
parent 47c16e4872
commit e641c82cdc

View file

@ -3184,7 +3184,7 @@ static int P_CheckLockedMovement(int const playerNum)
auto &thisPlayer = g_player[playerNum];
auto const pPlayer = thisPlayer.ps;
if (pPlayer->dead_flag || pPlayer->fist_incs || pPlayer->transporter_hold > 2 || pPlayer->hard_landing || pPlayer->access_incs > 0
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)))
@ -7922,7 +7922,7 @@ check_enemy_sprite:
if (g_levelTextTime > 0)
g_levelTextTime--;
if (pSprite->extra <= 0)
if (pSprite->extra <= 0 && !ud.god)
{
P_Dead(playerNum, sectorLotag, floorZ, ceilZ);
return;