From 52dc914a312697ee09d2cf36d709a0ff9130fa75 Mon Sep 17 00:00:00 2001 From: Misa Date: Mon, 3 May 2021 19:30:28 -0700 Subject: [PATCH] Don't allow setting best game deaths in custom levels Custom levels shouldn't touch main game save data, and best game deaths is no exception. I also added a MAKEANDPLAY ifdef just to be safe. --- desktop_version/src/Game.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 83b5ddf8..26becd01 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -2672,17 +2672,22 @@ void Game::updatestate(void) unlocknum(19); } - if (bestgamedeaths == -1) +#ifndef MAKEANDPLAY + if (!map.custommode) { - bestgamedeaths = deathcounts; - } - else - { - if (deathcounts < bestgamedeaths) + if (bestgamedeaths == -1) { bestgamedeaths = deathcounts; } + else + { + if (deathcounts < bestgamedeaths) + { + bestgamedeaths = deathcounts; + } + } } +#endif if (bestgamedeaths > -1) { if (bestgamedeaths <= 500) {