Core/Gridmonster: Increased upper value for search radius to size of grid
This commit is contained in:
@@ -183,8 +183,8 @@ Cell::Visit(const CellPair& standing_cell, TypeContainerVisitor<T, CONTAINER> &v
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//lets limit the upper value for search radius
|
//lets limit the upper value for search radius
|
||||||
if (radius > 333.0f)
|
if (radius > SIZE_OF_GRIDS)
|
||||||
radius = 333.0f;
|
radius = SIZE_OF_GRIDS;
|
||||||
|
|
||||||
//lets calculate object coord offsets from cell borders.
|
//lets calculate object coord offsets from cell borders.
|
||||||
CellArea area = Cell::CalculateCellArea(x_off, y_off, radius);
|
CellArea area = Cell::CalculateCellArea(x_off, y_off, radius);
|
||||||
|
|||||||
@@ -1869,8 +1869,8 @@ void Map::UpdateObjectsVisibilityFor(Player* player, Cell cell, CellPair cellpai
|
|||||||
cell.SetNoCreate();
|
cell.SetNoCreate();
|
||||||
TypeContainerVisitor<Trinity::VisibleNotifier, WorldTypeMapContainer > world_notifier(notifier);
|
TypeContainerVisitor<Trinity::VisibleNotifier, WorldTypeMapContainer > world_notifier(notifier);
|
||||||
TypeContainerVisitor<Trinity::VisibleNotifier, GridTypeMapContainer > grid_notifier(notifier);
|
TypeContainerVisitor<Trinity::VisibleNotifier, GridTypeMapContainer > grid_notifier(notifier);
|
||||||
cell.Visit(cellpair, world_notifier, *this, *player, player->GetVisibilityRange());
|
cell.Visit(cellpair, world_notifier, *this, *player, player->GetSightRange());
|
||||||
cell.Visit(cellpair, grid_notifier, *this, *player, player->GetVisibilityRange());
|
cell.Visit(cellpair, grid_notifier, *this, *player, player->GetSightRange());
|
||||||
|
|
||||||
// send data
|
// send data
|
||||||
notifier.SendToSelf();
|
notifier.SendToSelf();
|
||||||
|
|||||||
Reference in New Issue
Block a user