Core/Units: Update facing spline movement immediately after launching
Port From (https://github.com/TrinityCore/TrinityCore/commit/6c15fb00e5b7cf39cd6dc97c302418710bc21212)
This commit is contained in:
@@ -217,7 +217,10 @@ namespace Game.Entities
|
||||
init.SetFacing(ori);
|
||||
|
||||
//GetMotionMaster().LaunchMoveSpline(init, EventId.Face, MovementGeneratorPriority.Highest);
|
||||
init.Launch();
|
||||
UpdateSplineMovement((uint)init.Launch());
|
||||
Creature creature = ToCreature();
|
||||
if (creature != null)
|
||||
creature.GetAI().MovementInform(MovementGeneratorType.Effect, EventId.Face);
|
||||
}
|
||||
|
||||
public void SetFacingToObject(WorldObject obj, bool force = true)
|
||||
@@ -232,7 +235,10 @@ namespace Game.Entities
|
||||
init.SetFacing(GetAbsoluteAngle(obj)); // when on transport, GetAbsoluteAngle will still return global coordinates (and angle) that needs transforming
|
||||
|
||||
//GetMotionMaster().LaunchMoveSpline(init, EventId.Face, MovementGeneratorPriority.Highest);
|
||||
init.Launch();
|
||||
UpdateSplineMovement((uint)init.Launch());
|
||||
Creature creature = ToCreature();
|
||||
if (creature != null)
|
||||
creature.GetAI().MovementInform(MovementGeneratorType.Effect, EventId.Face);
|
||||
}
|
||||
|
||||
void SetFacingToPoint(Position point, bool force = true)
|
||||
@@ -249,7 +255,10 @@ namespace Game.Entities
|
||||
init.SetFacing(point.GetPositionX(), point.GetPositionY(), point.GetPositionZ());
|
||||
|
||||
//GetMotionMaster()->LaunchMoveSpline(std::move(init), EVENT_FACE, MOTION_PRIORITY_HIGHEST);
|
||||
init.Launch();
|
||||
UpdateSplineMovement((uint)init.Launch());
|
||||
Creature creature = ToCreature();
|
||||
if (creature != null)
|
||||
creature.GetAI().MovementInform(MovementGeneratorType.Effect, EventId.Face);
|
||||
}
|
||||
|
||||
public void MonsterMoveWithSpeed(float x, float y, float z, float speed, bool generatePath = false, bool forceDestination = false)
|
||||
|
||||
Reference in New Issue
Block a user