From 9be484f8c89d5e388fcba4b7b099131092c2ce40 Mon Sep 17 00:00:00 2001 From: MeanMachine Date: Wed, 10 Dec 2008 07:41:01 +0200 Subject: Small structural change to fix an error on some compilers. --HG-- branch : trunk --- src/game/WaypointMovementGenerator.cpp | 12 ++++++++++++ src/game/WaypointMovementGenerator.h | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src') 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::MovementInform(Creature &unit) unit.AI()->MovementInform(WAYPOINT_MOTION_TYPE, i_currentNode); } +template +bool WaypointMovementGenerator::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::GetDestination(float &x, float &y, float &z) const; +template bool WaypointMovementGenerator::GetDestination(float &x, float &y, float &z) const; + template<> void WaypointMovementGenerator::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: -- cgit v1.2.3