]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameTick.cpp
Fixed a bug loading all persons with the same ID. I hope it will fix weapon problems
[lugaru.git] / Source / GameTick.cpp
index 1a84485a31f86785300a89bbdcebfe5e6fc45944..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)