diff options
Diffstat (limited to 'src/game/MotionMaster.cpp')
-rw-r--r-- | src/game/MotionMaster.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/game/MotionMaster.cpp b/src/game/MotionMaster.cpp index b1168cac78d..81d72f8db6f 100644 --- a/src/game/MotionMaster.cpp +++ b/src/game/MotionMaster.cpp @@ -344,7 +344,7 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee } void -MotionMaster::MoveCharge(float x, float y, float z, float speed) +MotionMaster::MoveCharge(float x, float y, float z, float speed, uint32 id) { if(Impl[MOTION_SLOT_CONTROLLED] && Impl[MOTION_SLOT_CONTROLLED]->GetMovementGeneratorType() != DISTRACT_MOTION_TYPE) return; @@ -354,16 +354,24 @@ MotionMaster::MoveCharge(float x, float y, float z, float speed) if(i_owner->GetTypeId()==TYPEID_PLAYER) { DEBUG_LOG("Player (GUID: %u) charge point (X: %f Y: %f Z: %f)", i_owner->GetGUIDLow(), x, y, z ); - Mutate(new PointMovementGenerator<Player>(0,x,y,z), MOTION_SLOT_CONTROLLED); + Mutate(new PointMovementGenerator<Player>(id,x,y,z), MOTION_SLOT_CONTROLLED); } else { DEBUG_LOG("Creature (Entry: %u GUID: %u) charge point (X: %f Y: %f Z: %f)", i_owner->GetEntry(), i_owner->GetGUIDLow(), x, y, z ); - Mutate(new PointMovementGenerator<Creature>(0,x,y,z), MOTION_SLOT_CONTROLLED); + Mutate(new PointMovementGenerator<Creature>(id,x,y,z), MOTION_SLOT_CONTROLLED); } } +void MotionMaster::MoveFall(float z, uint32 id) +{ + i_owner->SetFlying(false); + i_owner->SendMovementFlagUpdate(); + //AddUnitMovementFlag(MOVEMENTFLAG_FALLING); + MoveCharge(i_owner->GetPositionX(), i_owner->GetPositionY(), z, SPEED_CHARGE, id); +} + void MotionMaster::MoveSeekAssistance(float x, float y, float z) { |