Core/Gridmonster: Increased upper value for search radius to size of grid

This commit is contained in:
Shauren
2011-08-08 13:16:03 +02:00
parent beaca1bd34
commit 8e2a32906d
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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);
+2 -2
View File
@@ -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();