aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsilver1ce <none@none>2010-01-05 21:48:12 +0200
committersilver1ce <none@none>2010-01-05 21:48:12 +0200
commit4a0af0314ee066f37ecb2a7fb8096ae8180dc966 (patch)
treea5a48cdfd0e2b2e7c143614389c3d86a37e9fdd3 /src
parentfa7920a0dd0941ce7dbdac9c0cb7d059016b8326 (diff)
typo
forget that cell area used not only in cell visit functions --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Cell.h1
-rw-r--r--src/game/CellImpl.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/game/Cell.h b/src/game/Cell.h
index 5fb430b1ad0..802c7bd8c45 100644
--- a/src/game/Cell.h
+++ b/src/game/Cell.h
@@ -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:
diff --git a/src/game/CellImpl.h b/src/game/CellImpl.h
index 9dae6eeedcd..4e206b7a1e7 100644
--- a/src/game/CellImpl.h
+++ b/src/game/CellImpl.h
@@ -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)