From 54f52418319a146548a33c4802134d1b7df7d2ee Mon Sep 17 00:00:00 2001
From: Ace Lite <47698279+Ace-Lite@users.noreply.github.com>
Date: Sat, 30 Mar 2024 13:40:05 +0100
Subject: [PATCH] Fix compiler error

---
 src/y_inter.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/y_inter.c b/src/y_inter.c
index 92d893d174..768d22238f 100644
--- a/src/y_inter.c
+++ b/src/y_inter.c
@@ -2163,6 +2163,11 @@ static void Y_AwardSpecialStageBonus(int denyaward)
 			Y_SetPerfectBonus(&players[i], &localbonuses[1]);
 		}
 
+		// grant extra lives right away since tally is faked
+		ptlives = min(
+			(INT32)((!ultimatemode && !modeattacking && players[i].lives != INFLIVES) ? max((INT32)((players[i].score / 50000) - (oldscore / 50000)), (INT32)0) : 0),
+			(INT32)(mapheaderinfo[prevmap]->maxbonuslives < 0 ? INT32_MAX : mapheaderinfo[prevmap]->maxbonuslives));
+
 		if (denyaward != 2)
 		{
 			players[i].score += localbonuses[0].points;
@@ -2174,12 +2179,6 @@ static void Y_AwardSpecialStageBonus(int denyaward)
 			if (players[i].recordscore > MAXSCORE)
 				players[i].recordscore = MAXSCORE;
 
-
-			// grant extra lives right away since tally is faked
-			ptlives = min(
-				(INT32)((!ultimatemode && !modeattacking && players[i].lives != INFLIVES) ? max((INT32)((players[i].score / 50000) - (oldscore / 50000)), (INT32)0) : 0),
-				(INT32)(mapheaderinfo[prevmap]->maxbonuslives < 0 ? INT32_MAX : mapheaderinfo[prevmap]->maxbonuslives));
-
 			P_GivePlayerLives(&players[i], ptlives);
 		}
 
-- 
GitLab