diff options
author | megamage <none@none> | 2009-07-16 11:49:00 +0800 |
---|---|---|
committer | megamage <none@none> | 2009-07-16 11:49:00 +0800 |
commit | 208087ff6ee592150b1ed387bbc135566a02a359 (patch) | |
tree | 42b3b460ce2276259e2673bc8b254e0812af1fbb /src/game/ObjectGridLoader.cpp | |
parent | 762528c5dd7908de47f2c2a7dcc5e7c95eb79744 (diff) |
[8182] Store and use Map* pointer in WorldObject instead map ids for speedup Author: Ambal
Also some code logic cleanups.
Changes let make more cleanups in base map access and other places,
but this chnages not inlcuded in patch.
*This patch may cause crash.
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectGridLoader.cpp')
-rw-r--r-- | src/game/ObjectGridLoader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game/ObjectGridLoader.cpp b/src/game/ObjectGridLoader.cpp index 368edce0a53..d08e3010a78 100644 --- a/src/game/ObjectGridLoader.cpp +++ b/src/game/ObjectGridLoader.cpp @@ -126,6 +126,7 @@ void LoadHelper(CellGuidSet const& guid_set, CellPair &cell, GridRefManager<T> & obj->GetGridRef().link(&m, obj); addUnitState(obj,cell); + obj->SetMap(map); obj->AddToWorld(); if(obj->isActiveObject()) map->AddToActive(obj); @@ -184,6 +185,7 @@ void LoadHelper(CellCorpseSet const& cell_corpses, CellPair &cell, CorpseMapType obj->GetGridRef().link(&m, obj); addUnitState(obj,cell); + obj->SetMap(map); obj->AddToWorld(); if(obj->isActiveObject()) map->AddToActive(obj); |