From c447f2a12b1fbca27006f170eae82a4eb5eee5a0 Mon Sep 17 00:00:00 2001
From: wolfy852 <wolfy852@hotmail.com>
Date: Sun, 22 Jan 2017 19:53:32 -0600
Subject: [PATCH] Fix perfect bonuses in SP

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

diff --git a/src/y_inter.c b/src/y_inter.c
index 98dfffc202..e841d260bc 100644
--- a/src/y_inter.c
+++ b/src/y_inter.c
@@ -2142,7 +2142,12 @@ static void Y_SetPerfectBonus(player_t *player, y_bonus_t *bstruct)
 		if (!sharedringtotal || sharedringtotal < nummaprings)
 			data.coop.gotperfbonus = 0;
 		else
+		{
 			data.coop.gotperfbonus = 1;
+			if (!mainrecords[gamemap-1])
+				G_AllocMainRecordData(gamemap-1);
+			mainrecords[gamemap-1]->rings = (UINT16)sharedringtotal; // Set a new record for Record Attack (shh, i know we're in MP)
+		}
 	}
 	if (!data.coop.gotperfbonus)
 		return;
-- 
GitLab