mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
* Remove CellLock class and all cell-level thread locking.
** It was wasting CPU power as cell-level locking is not needed. ** Our multithreading is on map-level, not cell-level. ** CellLock was just a 'proxy' between Cell and CellPair and in some cases carried redundant data. ** Some minor cleanup in Cell::Visit/Map::Visit. --HG-- branch : trunk
This commit is contained in:
@@ -501,8 +501,7 @@ Player* ScriptedAI::GetPlayerAtMinimumRange(float fMinimumRange)
|
||||
Trinity::PlayerSearcher<Trinity::PlayerAtMinimumRangeAway> searcher(m_creature, pPlayer, check);
|
||||
TypeContainerVisitor<Trinity::PlayerSearcher<Trinity::PlayerAtMinimumRangeAway>, GridTypeMapContainer> visitor(searcher);
|
||||
|
||||
CellLock<GridReadGuard> cell_lock(cell, pair);
|
||||
cell_lock->Visit(cell_lock, visitor, *(m_creature->GetMap()));
|
||||
cell.Visit(pair, visitor, *(m_creature->GetMap()));
|
||||
|
||||
return pPlayer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user