Merge branch 'ghost-disposal' into 'master'

Don't leave the ghosts of ghosts lying around; revert NO CONTEST on death in TA

Closes #1150

See merge request KartKrew/Kart!2095
This commit is contained in:
AJ Martinez 2024-03-13 12:43:30 +00:00
commit 33438aa448
4 changed files with 28 additions and 19 deletions

View file

@ -1548,8 +1548,9 @@ skippedghosttic:
if (*g->p == DEMOMARKER)
{
g->mo->momx = g->mo->momy = g->mo->momz = 0;
#if 1 // freeze frame (maybe more useful for time attackers)
#if 0 // freeze frame (maybe more useful for time attackers) (2024-03-11: you leave it behind anyway!)
g->mo->colorized = true;
g->mo->fuse = 10*TICRATE;
if (follow)
follow->colorized = true;
#else // dissapearing act

View file

@ -4425,10 +4425,9 @@ static void K_drawKartMinimap(void)
demoghost *g = ghosts;
while (g)
{
if (g->mo->skin)
if (g->mo && !P_MobjWasRemoved(g->mo) && g->mo->skin)
{
skin = ((skin_t*)g->mo->skin)-skins;
else
skin = 0;
workingPic = R_CanShowSkinInDemo(skin) ? faceprefix[skin][FACE_MINIMAP] : kp_unknownminimap;
@ -4446,6 +4445,8 @@ static void K_drawKartMinimap(void)
interpy = R_InterpolateFixed(g->mo->old_y, g->mo->y);
K_drawKartMinimapIcon(interpx, interpy, x, y, splitflags, workingPic, colormap);
}
g = g->next;
}
}

View file

@ -509,6 +509,13 @@ static void K_MovePlayerToRespawnPoint(player_t *player)
player->respawn.distanceleft = 0;
}
// Almost all legitimate driving, no matter how clumsy, should be faster than death in TA.
// Advance only as far as we need to prevent respawn loops!
if (modeattacking)
{
player->respawn.distanceleft = 0;
}
player->respawn.wp = player->respawn.wp->nextwaypoints[nwp];
K_RespawnAtWaypoint(player, player->respawn.wp);

View file

@ -2571,7 +2571,7 @@ static boolean P_KillPlayer(player_t *player, mobj_t *inflictor, mobj_t *source,
return false;
}
if (modeattacking)
if (modeattacking & ATTACKING_SPB)
{
// Death in SPB Attack is an instant loss.
P_DoPlayerExit(player, PF_NOCONTEST);