aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorccrs <ccrs@users.noreply.github.com>2018-05-05 18:53:59 +0200
committerShauren <shauren.trinity@gmail.com>2021-09-26 16:16:16 +0200
commitab740026b30b80e8599a0ad8c8a8eb466b6f4222 (patch)
tree4bc37ddff54a71f8136729f380c192383ccfbf1a
parent3f659ce5fff8a41279982fce152c06705ea957b0 (diff)
Core/Movement: crashfix workaround
untested ref #18471 (cherry picked from commit 76667e45a902f86bd341d40efa28037137e5e541)
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index e7fa587ac8f..a6d6b8b0bde 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -12299,7 +12299,9 @@ void Unit::SetFacingTo(float ori, bool force)
if (GetTransport())
init.DisableTransportPathTransformations(); // It makes no sense to target global orientation
init.SetFacing(ori);
- GetMotionMaster()->LaunchMoveSpline(std::move(init), EVENT_FACE, MOTION_SLOT_CONTROLLED);
+
+ //GetMotionMaster()->LaunchMoveSpline(std::move(init), EVENT_FACE, MOTION_SLOT_CONTROLLED);
+ init.Launch();
}
void Unit::SetFacingToObject(WorldObject const* object, bool force)
@@ -12312,7 +12314,9 @@ void Unit::SetFacingToObject(WorldObject const* object, bool force)
Movement::MoveSplineInit init(this);
init.MoveTo(GetPositionX(), GetPositionY(), GetPositionZ(), false);
init.SetFacing(GetAbsoluteAngle(object)); // when on transport, GetAbsoluteAngle will still return global coordinates (and angle) that needs transforming
- GetMotionMaster()->LaunchMoveSpline(std::move(init), EVENT_FACE, MOTION_SLOT_CONTROLLED);
+
+ //GetMotionMaster()->LaunchMoveSpline(std::move(init), EVENT_FACE, MOTION_SLOT_CONTROLLED);
+ init.Launch();
}
bool Unit::SetWalk(bool enable)