]> git.localhorst.tv Git - blank.git/commitdiff
fix loop removing players from world
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 10 Sep 2015 15:14:21 +0000 (17:14 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 10 Sep 2015 15:14:21 +0000 (17:14 +0200)
src/world/World.cpp

index 8b43657d3b58b1520e40c25019762883e6f7e5fb..3ff7da341e3e52f2d6989a2bf67969f896d51b98 100644 (file)
@@ -279,6 +279,7 @@ World::EntityHandle World::RemoveEntity(EntityHandle &eh) {
                if (player->entity == &*eh) {
                        chunks.UnregisterIndex(*player->chunks);
                        player = players.erase(player);
+                       end = players.end();
                } else {
                        ++player;
                }