forget that cell area used not only in cell visit functions

--HG--
branch : trunk
This commit is contained in:
silver1ce
2010-01-05 21:48:12 +02:00
parent fa7920a0dd
commit 4a0af0314e
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -168,6 +168,7 @@ struct TRINITY_DLL_DECL Cell
template<class LOCK_TYPE, class T, class CONTAINER> void Visit(const CellLock<LOCK_TYPE> &, TypeContainerVisitor<T, CONTAINER> &visitor, Map &m, const WorldObject &obj, float radius) const;
template<class LOCK_TYPE, class T, class CONTAINER> void Visit(const CellLock<LOCK_TYPE> &, TypeContainerVisitor<T, CONTAINER> &visitor, Map &, float radius, float x_off, float y_off) const;
static CellArea CalculateCellArea(const WorldObject &obj, float radius);
static CellArea CalculateCellArea(float x, float y, float radius);
private:
+5
View File
@@ -140,6 +140,11 @@ inline int CellHelper(const float radius)
return (int)ceilf(radius/SIZE_OF_GRID_CELL);
}
inline CellArea Cell::CalculateCellArea(const WorldObject &obj, float radius)
{
return Cell::CalculateCellArea(obj.GetPositionX(), obj.GetPositionY(), radius);
}
inline CellArea Cell::CalculateCellArea(float x, float y, float radius)
{
if(radius <= 0.0f)