Core: Add new system for parallelizing client packet processing. Handle WorldSession updates in Map::Update() where we are safe to proceed. Patch by Ambal.
(And clean up tabs and whitespace while rummaging around in there) Closes issue 5084. --HG-- branch : trunk
This commit is contained in:
@@ -504,6 +504,18 @@ void Map::VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor<Trinity::Obj
|
||||
|
||||
void Map::Update(const uint32 &t_diff)
|
||||
{
|
||||
/// update worldsessions for existing players
|
||||
for(m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter)
|
||||
{
|
||||
Player* plr = m_mapRefIter->getSource();
|
||||
if(plr && plr->IsInWorld())
|
||||
{
|
||||
//plr->Update(t_diff);
|
||||
WorldSession * pSession = plr->GetSession();
|
||||
MapSessionFilter updater(pSession);
|
||||
pSession->Update(t_diff, updater);
|
||||
}
|
||||
}
|
||||
/// update active cells around players and active objects
|
||||
resetMarkedCells();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user