diff options
| author | ccrs <ccrs@users.noreply.github.com> | 2025-10-25 16:17:49 +0200 |
|---|---|---|
| committer | ccrs <ccrs@users.noreply.github.com> | 2025-10-25 16:17:49 +0200 |
| commit | 825c88e85adbeb788ac903667632faeed99870e4 (patch) | |
| tree | 96eb0c25aac186985b9d836629666d9edd50eb8e /src/server/game/Movement/MotionMaster.cpp | |
| parent | 243f859c1a2adfdb52ee0c28b35a231924131d09 (diff) | |
Core/Movement: implement MOTIONMASTER_FLAG_STATIC_PREVENT_INITIALIZATION in MotionMaster + allow public flag access
Diffstat (limited to 'src/server/game/Movement/MotionMaster.cpp')
| -rw-r--r-- | src/server/game/Movement/MotionMaster.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index 4fdae221e41..b26d769da59 100644 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -304,7 +304,10 @@ void MotionMaster::Update(uint32 diff) if (HasFlag(MOTIONMASTER_FLAG_STATIC_INITIALIZATION_PENDING) && IsStatic(top)) { RemoveFlag(MOTIONMASTER_FLAG_STATIC_INITIALIZATION_PENDING); - top->Initialize(_owner); + if (!HasFlag(MOTIONMASTER_FLAG_STATIC_PREVENT_INITIALIZATION)) + top->Initialize(_owner); + else + RemoveFlag(MOTIONMASTER_FLAG_STATIC_PREVENT_INITIALIZATION); } if (top->HasFlag(MOVEMENTGENERATOR_FLAG_INITIALIZATION_PENDING)) top->Initialize(_owner); |
