diff options
Diffstat (limited to 'src/game/Map.cpp')
| -rw-r--r-- | src/game/Map.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp index c6b0739b6bd..cb472947169 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -257,7 +257,7 @@ template<> void Map::AddToGrid(Creature* obj, NGridType *grid, Cell const& cell) { // add to world object registry in grid - if(obj->isPet() || obj->HasSharedVision()) + if(obj->isPet() || obj->IsTempWorldObject) { (*grid)(cell.CellX(), cell.CellY()).AddWorldObject<Creature>(obj, obj->GetGUID()); } @@ -309,7 +309,7 @@ template<> void Map::RemoveFromGrid(Creature* obj, NGridType *grid, Cell const& cell) { // remove from world object registry in grid - if(obj->isPet() || obj->HasSharedVision()) + if(obj->isPet() || obj->IsTempWorldObject) { (*grid)(cell.CellX(), cell.CellY()).RemoveWorldObject<Creature>(obj, obj->GetGUID()); } @@ -353,6 +353,7 @@ void Map::SwitchGridContainers(T* obj, bool on) assert(false); } } + obj->IsTempWorldObject = on; } template void Map::SwitchGridContainers(Creature *, bool); |
