diff options
Diffstat (limited to 'src/game/MotionMaster.cpp')
-rw-r--r-- | src/game/MotionMaster.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/MotionMaster.cpp b/src/game/MotionMaster.cpp index 834770ae8a5..4b667ad9ccd 100644 --- a/src/game/MotionMaster.cpp +++ b/src/game/MotionMaster.cpp @@ -30,6 +30,7 @@ #include "PointMovementGenerator.h" #include "TargetedMovementGenerator.h" #include "WaypointMovementGenerator.h" +#include "RandomMovementGenerator.h" #include <cassert> @@ -105,6 +106,16 @@ MotionMaster::Clear(bool reset) } void +MotionMaster::MoveRandom(float spawndist) +{ + if(i_owner->GetTypeId()==TYPEID_UNIT) + { + DEBUG_LOG("Creature (GUID: %u) start moving random", i_owner->GetGUIDLow() ); + Mutate(new RandomMovementGenerator<Creature>(spawndist)); + } +} + +void MotionMaster::MovementExpired(bool reset) { if( empty() || size() == 1 ) |