Small structural change to fix an error on some compilers.

--HG--
branch : trunk
This commit is contained in:
MeanMachine
2008-12-10 07:41:01 +02:00
parent c2b217a1c1
commit 9be484f8c8
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -66,6 +66,18 @@ void WaypointMovementGenerator<Creature>::MovementInform(Creature &unit)
unit.AI()->MovementInform(WAYPOINT_MOTION_TYPE, i_currentNode); 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<> template<>
void WaypointMovementGenerator<Creature>::Reset(Creature &unit){} void WaypointMovementGenerator<Creature>::Reset(Creature &unit){}
+1 -1
View File
@@ -76,7 +76,7 @@ class TRINITY_DLL_SPEC WaypointMovementGenerator
void GeneratePathId(T &); void GeneratePathId(T &);
void Reset(T &unit); void Reset(T &unit);
bool Update(T &, const uint32 &); 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; } MovementGeneratorType GetMovementGeneratorType() { return WAYPOINT_MOTION_TYPE; }
private: private: