]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameTick.cpp
Disabling exception catching when building debug, to ease gdb use
[lugaru.git] / Source / GameTick.cpp
index 1dfebb29955118d4bdef80c76b18a149c64382bd..5dfc3939ad2e53ba4de9a94110983babb76dbbba 100644 (file)
@@ -908,12 +908,13 @@ void Game::Loadlevel(const std::string& name)
     if (numplayers > maxplayers) {
         cout << "Warning: this level contains more players than allowed" << endl;
     }
+    unsigned j = 1;
     for (int i = 1; i < numplayers; i++) {
-        unsigned j = 1;
         try {
             Person::players.push_back(shared_ptr<Person>(new Person(tfile, mapvers, j)));
             j++;
         } catch (InvalidPersonException e) {
+            cerr << "Invalid Person found in " << name << endl;
         }
     }
     if (visibleloading)
@@ -1105,6 +1106,7 @@ void Game::Loadlevel(const std::string& name)
         firstload = 1;
 
     leveltime = 0;
+    wonleveltime = 0;
     visibleloading = 0;
 }
 
@@ -6218,6 +6220,7 @@ void Game::TickOnceAfter()
                     accountactive->winCampaignLevel(whichchoice, bonustotal, leveltime);
                     scoreadded = 1;
                 } else {
+                    wonleveltime = leveltime;
                     accountactive->winLevel(whichlevel, bonustotal - startbonustotal, leveltime);
                 }
                 won = 1;