From 7f61147973eb097122c5c8fd56f712cf3f7f25b0 Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 2 Jul 2020 19:56:26 -0700 Subject: [PATCH] Fix still being able to unlock things in custommode This was caused by the fact that not all unlocks were done through the Game::unlocknum() function. Some just set the unlock number directly. But it's fixed now. --- desktop_version/src/Game.cpp | 4 ++-- desktop_version/src/Script.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 2f4097d7..8213d458 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -3390,7 +3390,7 @@ void Game::updatestate() { //flip mode complete NETWORK_unlockAchievement("vvvvvvgamecompleteflip"); - unlock[19] = true; + unlocknum(19); } if (bestgamedeaths == -1) @@ -3425,7 +3425,7 @@ void Game::updatestate() if (nodeathmode) { NETWORK_unlockAchievement("vvvvvvmaster"); //bloody hell - unlock[20] = true; + unlocknum(20); state = 3520; statedelay = 0; } diff --git a/desktop_version/src/Script.cpp b/desktop_version/src/Script.cpp index f7201246..c7a601bf 100644 --- a/desktop_version/src/Script.cpp +++ b/desktop_version/src/Script.cpp @@ -1515,7 +1515,7 @@ void scriptclass::run() } else if (words[0] == "entersecretlab") { - game.unlock[8] = true; + game.unlocknum(8); game.insecretlab = true; } else if (words[0] == "leavesecretlab")