From: Côme Chilliet Date: Sat, 10 Dec 2016 16:47:05 +0000 (+0700) Subject: Fixed a bug loading all persons with the same ID. I hope it will fix weapon problems X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=704718ac5394f88b2019b2f118fd26204594690d;p=lugaru.git Fixed a bug loading all persons with the same ID. I hope it will fix weapon problems --- diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 1a84485..5dfc393 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -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(new Person(tfile, mapvers, j))); j++; } catch (InvalidPersonException e) { + cerr << "Invalid Person found in " << name << endl; } } if (visibleloading)