diff options
author | megamage <none@none> | 2008-12-10 11:21:59 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-12-10 11:21:59 -0600 |
commit | 4182df058c0b2d01db3a5c4bf5df65e775d89ec6 (patch) | |
tree | 31c6a11a504cf06f01cdb3e75128c80f49ee072e /src | |
parent | ac822bb616645f75b0fee1572e83fd4ca30b9c71 (diff) | |
parent | 9be484f8c89d5e388fcba4b7b099131092c2ce40 (diff) |
*Merge with 448.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/WaypointMovementGenerator.cpp | 12 | ||||
-rw-r--r-- | src/game/WaypointMovementGenerator.h | 2 |
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: |