From b26e94b9190a9cd839b9eaf9596facbc0f0f6f53 Mon Sep 17 00:00:00 2001 From: Misa Date: Sun, 26 Apr 2020 15:19:50 -0700 Subject: [PATCH] Simplify GAMEMODE loop Now that towers no longer use separate functions, we can remove the map.towermode conditional. --- desktop_version/src/main.cpp | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/desktop_version/src/main.cpp b/desktop_version/src/main.cpp index c1219d12..38b571be 100644 --- a/desktop_version/src/main.cpp +++ b/desktop_version/src/main.cpp @@ -422,25 +422,14 @@ int main(int argc, char *argv[]) titlelogic(); break; case GAMEMODE: - if (map.towermode) + if (script.running) { - gameinput(); - gamerender(); - gamelogic(); - + script.run(); } - else - { - if (script.running) - { - script.run(); - } - - gameinput(); - gamerender(); - gamelogic(); - } + gameinput(); + gamerender(); + gamelogic(); break;