diff options
author | shadowu@mail.bg <none@none> | 2008-12-19 00:37:40 +0200 |
---|---|---|
committer | shadowu@mail.bg <none@none> | 2008-12-19 00:37:40 +0200 |
commit | 51f0c70b7ea7eca2b0fcc05a38fa155b7378741f (patch) | |
tree | 52f9e2db42bfc10d9fd8b65b26c9884ae6ebe71c /src/game/WaypointMovementGenerator.cpp | |
parent | 058db69e0730975cd0e3e03e5abca78828808dd8 (diff) |
*Movement Generators standardization.
- bool GetDestination(&x,&y,&z) added to all movement generators.(it is used by update of players view distance)
- Fixed when creature entering in combat not count this as StoppedByPlayer.
- Random Movement Generator - added support for creating custom spawndist during the game.
- Random Movement Generator - Db spawndist is checked only at initialize(NOT in each sellect of random location).
- Added Random Movement to motion master - it can be called now by MoveRandom(spawndist) e.g. for use in SD2.
- Home and Random movements no more using RespawnCoords(Home Position has implemented)
- Fixed bug when creature is moving on path and enter combat, after that returns to spawn position.
-Typo fix in Confused Movement Generator
--HG--
branch : trunk
Diffstat (limited to 'src/game/WaypointMovementGenerator.cpp')
-rw-r--r-- | src/game/WaypointMovementGenerator.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game/WaypointMovementGenerator.cpp b/src/game/WaypointMovementGenerator.cpp index 56f244dd831..42212113f61 100644 --- a/src/game/WaypointMovementGenerator.cpp +++ b/src/game/WaypointMovementGenerator.cpp @@ -43,7 +43,6 @@ void WaypointMovementGenerator<Creature>::Initialize(Creature &u) { i_currentNode = -1; - u.StopMoving(); if(!path_id) path_id = u.GetWaypointPath(); waypoints = WaypointMgr.GetPath(path_id); @@ -84,7 +83,11 @@ bool WaypointMovementGenerator<Player>::GetDestination(float &x, float &y, float } template<> -void WaypointMovementGenerator<Creature>::Reset(Creature &unit){} +void WaypointMovementGenerator<Creature>::Reset(Creature &unit) +{ + StopedByPlayer = false; + i_nextMoveTime.Reset(0); +} template<> void WaypointMovementGenerator<Player>::Reset(Player &unit){} |