*Copy and paste woes D:
--HG-- branch : trunk
This commit is contained in:
+6
-6
@@ -228,19 +228,19 @@ Cell::Visit(const CellLock<LOCK_TYPE> &l, TypeContainerVisitor<T, CONTAINER> &vi
|
||||
//no jokes here... Actually placing ASSERT() here was good idea, but
|
||||
//we had some problems with DynamicObjects, which pass radius = 0.0f (DB issue?)
|
||||
//maybe it is better to just return when radius <= 0.0f?
|
||||
if(radius <= 0.0f)
|
||||
if (radius <= 0.0f)
|
||||
{
|
||||
m.Visit(l, visitor);
|
||||
return;
|
||||
}
|
||||
//lets limit the upper value for search radius
|
||||
if(radius > 333.0f)
|
||||
if (radius > 333.0f)
|
||||
radius = 333.0f;
|
||||
|
||||
//lets calculate object coord offsets from cell borders.
|
||||
CellArea area = Cell::CalculateCellArea(obj, radius);
|
||||
//if radius fits inside standing cell
|
||||
if(!area)
|
||||
if (!area)
|
||||
{
|
||||
m.Visit(l, visitor);
|
||||
return;
|
||||
@@ -254,7 +254,7 @@ Cell::Visit(const CellLock<LOCK_TYPE> &l, TypeContainerVisitor<T, CONTAINER> &vi
|
||||
//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(((end_cell.x_coord - begin_cell.x_coord) > 4) && ((end_cell.y_coord - begin_cell.y_coord) > 4))
|
||||
if (((end_cell.x_coord - begin_cell.x_coord) > 4) && ((end_cell.y_coord - begin_cell.y_coord) > 4))
|
||||
{
|
||||
VisitCircle(l, visitor, m, begin_cell, end_cell);
|
||||
return;
|
||||
@@ -265,9 +265,9 @@ Cell::Visit(const CellLock<LOCK_TYPE> &l, TypeContainerVisitor<T, CONTAINER> &vi
|
||||
m.Visit(l, visitor);
|
||||
|
||||
// loop the cell range
|
||||
for (uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; x++)
|
||||
for (uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; ++x)
|
||||
{
|
||||
for (uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; y++)
|
||||
for (uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; ++y)
|
||||
{
|
||||
CellPair cell_pair(x,y);
|
||||
//lets skip standing cell since we already visited it
|
||||
|
||||
Reference in New Issue
Block a user