mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[8182] Store and use Map* pointer in WorldObject instead map ids for speedup
Also some code logic cleanups. Changes let make more cleanups in base map access and other places, but this chnages not inlcuded in patch. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
fcb34b3928
commit
58209ee79a
25 changed files with 180 additions and 193 deletions
|
|
@ -123,6 +123,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);
|
||||
|
|
@ -151,6 +152,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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue