diff options
| author | megamage <none@none> | 2009-03-02 18:01:27 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-03-02 18:01:27 -0600 |
| commit | 3716a5292b44d23e713c6972ad193faa5b821080 (patch) | |
| tree | b80a01d1c79bc1faf1d525f75eca1808676dba97 /src/game/Map.cpp | |
| parent | cdd178b9c29853d5e498b474006a3635009a50a4 (diff) | |
*Fix a crash.
--HG--
branch : trunk
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); |
