aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2012-03-28 01:26:45 +0200
committerShauren <shauren.trinity@gmail.com>2012-03-28 01:26:45 +0200
commit76397cf9311eb89a75d7a71b973c7d480a40b9a7 (patch)
tree601f42a458bc61ae26770359ad1e1e6f971b65e8 /src
parentae0511a2a445dc189ed1c822a43e23adb3d644b0 (diff)
Core/Grids: Removed unsafe substraction, fixes possible freezes
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Grids/Cells/CellImpl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Grids/Cells/CellImpl.h b/src/server/game/Grids/Cells/CellImpl.h
index 77830bc59d5..b224b3865e0 100644
--- a/src/server/game/Grids/Cells/CellImpl.h
+++ b/src/server/game/Grids/Cells/CellImpl.h
@@ -91,7 +91,7 @@ inline void Cell::Visit(CellCoord const& standing_cell, TypeContainerVisitor<T,
//if radius is known to reach cell area more than 4x4 then we should call optimized VisitCircle
//currently this technique works with MAX_NUMBER_OF_CELLS 16 and higher, with lower values
//there are nothing to optimize because SIZE_OF_GRID_CELL is too big...
- if (((area.high_bound.x_coord - area.low_bound.x_coord) > 4) && ((area.high_bound.y_coord - area.low_bound.y_coord) > 4))
+ if ((area.high_bound.x_coord > (area.low_bound.x_coord + 4)) && (area.high_bound.y_coord > (area.low_bound.y_coord + 4)))
{
VisitCircle(visitor, map, area.low_bound, area.high_bound);
return;