Skip to content

Commit

Permalink
fix(Core/Map): remove hackfix that blocked update of GOs beeing set a…
Browse files Browse the repository at this point in the history
…ctive (azerothcore#18812)

- this just broke the whole purpose of setActive(true) if the
  gameobjects is still not really beeing set active afterwards
- GetGridActivationRange() returns 0.0f for gameobjects anyways
- so CalculateCellArea() will result in the minimal cell area
  around the gameobject's position
- if the cell around the gameobject should not be updated, the
  gameobject should not have been set active in the first place
  • Loading branch information
sudlud authored Apr 30, 2024
1 parent ab84d9f commit ab7405f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/server/game/Maps/Map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,9 +702,6 @@ void Map::VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor<Acore::Objec
if (!obj->IsPositionValid())
return;

if (obj->GetGridActivationRange() <= 0.0f) // pussywizard: gameobjects for example are on active lists, but range is equal to 0 (they just prevent grid unloading)
return;

// Update mobs/objects in ALL visible cells around object!
CellArea area = Cell::CalculateCellArea(obj->GetPositionX(), obj->GetPositionY(), obj->GetGridActivationRange());

Expand Down

0 comments on commit ab7405f

Please sign in to comment.