]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameTick.cpp
Attempt at fixing LoadStuff calling logic
[lugaru.git] / Source / GameTick.cpp
index 1f971e70f8f7869b67d0232493d7e1e6b9b74094..2a4f4bd8a644cbc0fcd174390a4ee1aad7c3ab1c 100644 (file)
@@ -502,8 +502,9 @@ void Game::Loadlevel(int which)
         char buf[32];
         snprintf(buf, 32, "map%d", which + 1); // challenges
         Loadlevel(buf);
-    } else
+    } else {
         Loadlevel("mapsave");
+    }
 }
 
 void Game::Loadlevel(const std::string& name, bool tutorial)
@@ -924,9 +925,6 @@ void Game::Loadlevel(const std::string& name, bool tutorial)
     oldmusicvolume[2] = 0;
     oldmusicvolume[3] = 0;
 
-    if (!firstload)
-        firstload = 1;
-
     leveltime = 0;
     wonleveltime = 0;
     visibleloading = false;
@@ -4553,8 +4551,9 @@ void Game::TickOnceAfter()
                     loading = 2;
                     loadtime = 0;
                     targetlevel = 7;
-                    if (!firstload)
+                    if (!firstLoadDone) {
                         LoadStuff();
+                    }
                     whichchoice = 0;
                     actuallevel = campaignlevels[actuallevel].nextlevel.front();
                     visibleloading = true;