From: Daniel Karbach Date: Thu, 10 Sep 2015 15:14:21 +0000 (+0200) Subject: fix loop removing players from world X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=36923ee2defd0848c5a530721114d4e553872305;p=blank.git fix loop removing players from world --- diff --git a/src/world/World.cpp b/src/world/World.cpp index 8b43657..3ff7da3 100644 --- a/src/world/World.cpp +++ b/src/world/World.cpp @@ -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; }