mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[6893] Fixes in waypoint movement code.
Initilize variables and reset last movment timer for correct waypoints work at reset movement.
This commit is contained in:
parent
2e2055c469
commit
477ba70782
2 changed files with 11 additions and 5 deletions
|
|
@ -73,10 +73,8 @@ class MANGOS_DLL_SPEC WaypointMovementGenerator<Creature>
|
|||
: public MovementGeneratorMedium< Creature, WaypointMovementGenerator<Creature> >,
|
||||
public PathMovementBase<Creature, WaypointPath*>
|
||||
{
|
||||
TimeTrackerSmall i_nextMoveTime;
|
||||
std::vector<bool> i_hasDone;
|
||||
public:
|
||||
WaypointMovementGenerator(Creature &) : i_nextMoveTime(0) {}
|
||||
WaypointMovementGenerator(Creature &) : i_nextMoveTime(0), b_StopedByPlayer(false) {}
|
||||
~WaypointMovementGenerator() { ClearWaypoints(); }
|
||||
void Initialize(Creature &u)
|
||||
{
|
||||
|
|
@ -85,7 +83,12 @@ public PathMovementBase<Creature, WaypointPath*>
|
|||
LoadPath(u);
|
||||
}
|
||||
void Finalize(Creature &) {}
|
||||
void Reset(Creature &u) { ReloadPath(u); }
|
||||
void Reset(Creature &u)
|
||||
{
|
||||
ReloadPath(u);
|
||||
b_StopedByPlayer = false;
|
||||
i_nextMoveTime.Reset(0);
|
||||
}
|
||||
bool Update(Creature &u, const uint32 &diff);
|
||||
|
||||
void MovementInform(Creature &);
|
||||
|
|
@ -104,6 +107,9 @@ public PathMovementBase<Creature, WaypointPath*>
|
|||
static void Initialize(void);
|
||||
private:
|
||||
void ClearWaypoints();
|
||||
|
||||
TimeTrackerSmall i_nextMoveTime;
|
||||
std::vector<bool> i_hasDone;
|
||||
bool b_StopedByPlayer;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "6892"
|
||||
#define REVISION_NR "6893"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue