From 704718ac5394f88b2019b2f118fd26204594690d Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Sat, 10 Dec 2016 23:47:05 +0700 Subject: [PATCH] Fixed a bug loading all persons with the same ID. I hope it will fix weapon problems --- Source/GameTick.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.39.2