Splitscreen GP: hide GAME OVERED player sprite and VFX

- Does not interfere with destroyed kart explosion
This commit is contained in:
James R 2024-04-06 17:45:44 -07:00
parent 1ff321d375
commit 01016ceee9
2 changed files with 13 additions and 0 deletions

View file

@ -4512,6 +4512,10 @@ static void K_drawKartMinimap(void)
if ((gametyperules & GTR_BUMPERS) && (players[i].pflags & PF_ELIMINATED))
continue;
// This gets set for a player who has GAME OVER'd
if (P_MobjIsReappearing(players[i].mo))
continue;
if (i == displayplayers[0] || i == displayplayers[1] || i == displayplayers[2] || i == displayplayers[3])
{
// Draw display players on top of everything else
@ -4723,6 +4727,10 @@ static void K_drawKartMinimap(void)
mobj = players[localplayers[i]].mo;
// This gets set for a player who has GAME OVER'd
if (P_MobjIsReappearing(mobj))
continue;
if (mobj->health <= 0 && (players[localplayers[i]].pflags & PF_NOCONTEST))
{
if (P_MobjWasRemoved(mobj->tracer))

View file

@ -4156,6 +4156,11 @@ void P_PlayerThink(player_t *player)
player->playerstate = PST_DEAD;
// hide the player sprite forever
player->mo->hitlag = INT32_MAX;
player->mo->renderflags |= RF_DONTDRAW;
player->mo->reappear = INFTICS; // also hides the follower
// respawn from where you died
player->respawn.pointx = player->mo->x;
player->respawn.pointy = player->mo->y;