aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Movement/MotionMaster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Movement/MotionMaster.cpp')
-rw-r--r--src/server/game/Movement/MotionMaster.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 0cb7e3811c3..b2e2f1bbd43 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -118,9 +118,12 @@ void MotionMaster::AddToWorld()
if (!HasFlag(MOTIONMASTER_FLAG_INITIALIZATION_PENDING))
return;
+ AddFlag(MOTIONMASTER_FLAG_INITIALIZING);
+ RemoveFlag(MOTIONMASTER_FLAG_INITIALIZATION_PENDING);
+
ResolveDelayedActions();
- RemoveFlag(MOTIONMASTER_FLAG_INITIALIZATION_PENDING);
+ RemoveFlag(MOTIONMASTER_FLAG_INITIALIZING);
}
bool MotionMaster::Empty() const
@@ -287,7 +290,7 @@ void MotionMaster::Update(uint32 diff)
if (!_owner)
return;
- if (HasFlag(MOTIONMASTER_FLAG_INITIALIZATION_PENDING))
+ if (HasFlag(MOTIONMASTER_FLAG_INITIALIZATION_PENDING | MOTIONMASTER_FLAG_INITIALIZING))
return;
ASSERT(!Empty(), "MotionMaster:Update: update called without Initializing! (%s)", _owner->GetGUID().ToString().c_str());