Move where PF_HITFINISHLINE is removed

Also removes a few remaining instances of player->bot being checked to affect gameplay where it shouldn't from vanilla, but it's code that is rarely used / completely unused anyway.
This commit is contained in:
Sally Coolatta 2021-12-11 04:12:06 -05:00
parent ba26a3a223
commit 8d5cec5ebf
4 changed files with 6 additions and 11 deletions

View file

@ -8629,8 +8629,6 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
boolean HOLDING_ITEM = (player->pflags & (PF_ITEMOUT|PF_EGGMANOUT));
boolean NO_HYUDORO = (player->stealingtimer == 0);
player->pflags &= ~PF_HITFINISHLINE;
if (!player->exiting)
{
if (player->oldposition < player->position) // But first, if you lost a place,

View file

@ -4095,7 +4095,7 @@ boolean P_BossTargetPlayer(mobj_t *actor, boolean closest)
player = &players[actor->lastlook];
if (player->bot || player->spectator)
if (player->spectator)
continue; // ignore notarget
if (!player->mo || P_MobjWasRemoved(player->mo))

View file

@ -4222,9 +4222,6 @@ void P_PlayerThink(player_t *player)
ticcmd_t *cmd;
const size_t playeri = (size_t)(player - players);
player->old_drawangle = player->drawangle;
player->old_viewrollangle = player->viewrollangle;
#ifdef PARANOIA
if (!player->mo)
I_Error("p_playerthink: players[%s].mo == NULL", sizeu1(playeri));
@ -4237,6 +4234,11 @@ void P_PlayerThink(player_t *player)
player->playerstate = PST_DEAD;
}
player->old_drawangle = player->drawangle;
player->old_viewrollangle = player->viewrollangle;
player->pflags &= ~PF_HITFINISHLINE;
if (player->awayviewmobj && P_MobjWasRemoved(player->awayviewmobj))
{
P_SetTarget(&player->awayviewmobj, NULL); // remove awayviewmobj asap if invalid

View file

@ -311,11 +311,6 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
}
player->skincolor = newcolor = skin->prefcolor;
if (player->bot && botingame)
{
botskin = (UINT8)(skinnum + 1);
botcolor = skin->prefcolor;
}
}
#endif