]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameTick.cpp
Use a mono font for the console text
[lugaru.git] / Source / GameTick.cpp
index 1f971e70f8f7869b67d0232493d7e1e6b9b74094..ed22ee26b33e57f299ee51cd61f5c9fc450b8013 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)
@@ -706,6 +707,10 @@ void Game::Loadlevel(const std::string& name, bool tutorial)
 
     funpackf(tfile, "Bi", &environment);
 
+    if (environment != oldenvironment)
+        Setenvironment(environment);
+    oldenvironment = environment;
+
     Object::LoadObjectsFromFile(tfile, stealthloading);
 
     if (mapvers >= 7) {
@@ -769,9 +774,6 @@ void Game::Loadlevel(const std::string& name, bool tutorial)
     funpackf(tfile, "Bf Bf Bf Bf", &mapcenter.x, &mapcenter.y, &mapcenter.z, &mapradius);
 
     SetUpLighting();
-    if (environment != oldenvironment)
-        Setenvironment(environment);
-    oldenvironment = environment;
 
     if (!stealthloading) {
         Object::AddObjectsToTerrain();
@@ -924,9 +926,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;
@@ -4290,7 +4289,7 @@ void Game::TickOnceAfter()
                     Person::players[i]->aitype == getweapontype ||
                     Person::players[i]->aitype == gethelptype ||
                     Person::players[i]->aitype == searchtype) &&
-                    !Person::players[i]->dead/*&&Person::players[i]->surprised<=0*/ &&
+                    !Person::players[i]->dead &&
                     (Person::players[i]->animTarget != sneakattackedanim &&
                      Person::players[i]->animTarget != knifesneakattackedanim &&
                      Person::players[i]->animTarget != swordsneakattackedanim)) {
@@ -4553,8 +4552,9 @@ void Game::TickOnceAfter()
                     loading = 2;
                     loadtime = 0;
                     targetlevel = 7;
-                    if (!firstload)
+                    if (!firstLoadDone) {
                         LoadStuff();
+                    }
                     whichchoice = 0;
                     actuallevel = campaignlevels[actuallevel].nextlevel.front();
                     visibleloading = true;