]> git.jsancho.org Git - lugaru.git/commitdiff
Fixed a bug loading all persons with the same ID. I hope it will fix weapon problems
authorCôme Chilliet <come@chilliet.eu>
Sat, 10 Dec 2016 16:47:05 +0000 (23:47 +0700)
committerCôme Chilliet <come@chilliet.eu>
Sat, 10 Dec 2016 16:47:05 +0000 (23:47 +0700)
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)