Core/DynamicObjects: Restore the ability of DynamicObjects to be world objects which was accidentally removed in f0f4a620fb breaking Far Sight (#24046)

Fixes #17081
This commit is contained in:
xvwyh
2020-01-14 20:42:30 +02:00
committed by Giacomo Pozzoni
parent f1c338f137
commit d4ba47a76e

View File

@@ -336,7 +336,10 @@ template<>
void Map::AddToGrid(DynamicObject* obj, Cell const& cell)
{
NGridType* grid = getNGrid(cell.GridX(), cell.GridY());
grid->GetGridType(cell.CellX(), cell.CellY()).AddGridObject(obj);
if (obj->IsWorldObject())
grid->GetGridType(cell.CellX(), cell.CellY()).AddWorldObject(obj);
else
grid->GetGridType(cell.CellX(), cell.CellY()).AddGridObject(obj);
obj->SetCurrentCell(cell);
}