Merge branch 'splitscreen-game-over-fix' into 'master'

Fix splitscreen GP GAME OVER visual bugs

Closes #1247

See merge request KartKrew/Kart!2239
This commit is contained in:
Sal 2024-04-07 03:14:05 +00:00
commit 16f6988454
3 changed files with 25 additions and 5 deletions

View file

@ -4346,12 +4346,15 @@ static void K_drawKartMinimap(void)
return; // no pic, just get outta here
}
else if (r_splitscreen < 2) // 1/2P right aligned
else if (r_splitscreen < 1) // 1P right aligned
{
splitflags = (V_SLIDEIN|V_SNAPTORIGHT);
}
else if (r_splitscreen == 3) // 4P splits
else // 2/4P splits
{
if (r_splitscreen == 1)
splitflags = V_SNAPTORIGHT; // 2P right aligned
dofade = true;
}
// 3P lives in the middle of the bottom right
@ -4390,7 +4393,7 @@ static void K_drawKartMinimap(void)
return;
}
minimaptrans = ((10-minimaptrans)<<FF_TRANSSHIFT);
minimaptrans = ((10-minimaptrans)<<V_ALPHASHIFT);
// Really looking forward to never writing this loop again
UINT8 bestplayer = MAXPLAYERS;
@ -4512,6 +4515,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 +4730,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

@ -551,9 +551,11 @@ void level_tally_t::Init(player_t *player)
done = (player->spectator == true || player->bot == true);
if (specialstageinfo.valid == true && (player->pflags & PF_NOCONTEST) == PF_NOCONTEST)
if (specialstageinfo.valid == true && (player->pflags & PF_NOCONTEST) == PF_NOCONTEST &&
(G_GametypeUsesLives() && player->lives <= 0) == false)
{
// No tally when losing special stages
// Except when GAME OVER
state = TALLY_ST_IGNORE;
delay = 0;
}

View file

@ -2882,7 +2882,9 @@ static void P_DeathThink(player_t *player)
}
// Spectate another player after 2 seconds
if (G_IsPartyLocal(player - players) && playerGone == true && (gametyperules & GTR_BUMPERS) && player->deadtimer == 2*TICRATE)
if (G_IsPartyLocal(player - players) && playerGone == true &&
(gametyperules & GTR_BUMPERS) && battleprisons == false &&
player->deadtimer == 2*TICRATE)
{
K_ToggleDirector(G_PartyPosition(player - players), true);
}
@ -4156,6 +4158,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;