aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMeanMachine <none@none>2008-12-10 07:41:01 +0200
committerMeanMachine <none@none>2008-12-10 07:41:01 +0200
commit9be484f8c89d5e388fcba4b7b099131092c2ce40 (patch)
treed1a1a76e248474b7e7866d4bee4117b1de5892f2 /src
parentc2b217a1c1d4b3153fdf796141719415a39b9df6 (diff)
Small structural change to fix an error on some compilers.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/WaypointMovementGenerator.cpp12
-rw-r--r--src/game/WaypointMovementGenerator.h2
2 files changed, 13 insertions, 1 deletions
diff --git a/src/game/WaypointMovementGenerator.cpp b/src/game/WaypointMovementGenerator.cpp
index 84f121eb9b3..47119aa007c 100644
--- a/src/game/WaypointMovementGenerator.cpp
+++ b/src/game/WaypointMovementGenerator.cpp
@@ -66,6 +66,18 @@ void WaypointMovementGenerator<Creature>::MovementInform(Creature &unit)
unit.AI()->MovementInform(WAYPOINT_MOTION_TYPE, i_currentNode);
}
+template<class T>
+bool WaypointMovementGenerator<T>::GetDestination(float &x, float &y, float &z) const
+{
+ if(i_destinationHolder.HasArrived())
+ return false;
+
+ i_destinationHolder.GetDestination(x, y, z);
+ return true;
+}
+template bool WaypointMovementGenerator<Creature>::GetDestination(float &x, float &y, float &z) const;
+template bool WaypointMovementGenerator<Player>::GetDestination(float &x, float &y, float &z) const;
+
template<>
void WaypointMovementGenerator<Creature>::Reset(Creature &unit){}
diff --git a/src/game/WaypointMovementGenerator.h b/src/game/WaypointMovementGenerator.h
index 78752c771f0..5995188ac8d 100644
--- a/src/game/WaypointMovementGenerator.h
+++ b/src/game/WaypointMovementGenerator.h
@@ -76,7 +76,7 @@ class TRINITY_DLL_SPEC WaypointMovementGenerator
void GeneratePathId(T &);
void Reset(T &unit);
bool Update(T &, const uint32 &);
- bool GetDestination(float &x, float &y, float &z) const{if(i_destinationHolder.HasArrived())return false; i_destinationHolder.GetDestination(x, y, z); return true;}
+ bool GetDestination(float &x, float &y, float &z) const;
MovementGeneratorType GetMovementGeneratorType() { return WAYPOINT_MOTION_TYPE; }
private: