From e9a8c2d21ae362ea08b1d26857eaba0201f16675 Mon Sep 17 00:00:00 2001 From: Tatsuru <44866610+Ikkarin@users.noreply.github.com> Date: Sun, 19 Jan 2020 14:30:05 -0300 Subject: [PATCH] No more losing lives when finished --- src/p_inter.c | 3 ++- src/st_stuff.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index 71dcd70a1..5e1f7345c 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -2527,7 +2527,8 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget else if (!target->player->bot && !target->player->spectator && (target->player->lives != INFLIVES) && G_GametypeUsesLives()) { - target->player->lives -= 1; // Lose a life Tails 03-11-2000 + if (!(target->player->pflags & PF_FINISHED)) + target->player->lives -= 1; // Lose a life Tails 03-11-2000 if (target->player->lives <= 0) // Tails 03-14-2000 { diff --git a/src/st_stuff.c b/src/st_stuff.c index 4676506fc..9c9c80164 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -944,7 +944,7 @@ static void ST_drawLivesArea(void) '\x16' | 0x80 | hudinfo[HUD_LIVES].f|V_PERPLAYER|V_HUDTRANS, false); else { - if (stplyr->playerstate == PST_DEAD && !(stplyr->spectator) && (livescount || stplyr->deadtimer < (TICRATE<<1))) + if (stplyr->playerstate == PST_DEAD && !(stplyr->spectator) && (livescount || stplyr->deadtimer < (TICRATE<<1)) && !(stplyr->pflags & PF_FINISHED)) livescount++; if (livescount > 99) livescount = 99;