diff options
| author | Shauren <shauren.trinity@gmail.com> | 2025-10-26 09:56:37 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2025-10-26 09:56:37 +0100 |
| commit | 858f8c12d7d97c5094347c753f1fc905135034f4 (patch) | |
| tree | 50f5168e45d7e6ac0f09e5ac685954659de10951 /src | |
| parent | 7c006ed265d0780401db0768ae2c9be85c5f60ce (diff) | |
Revert "Core/Movement: implement MOTIONMASTER_FLAG_STATIC_PREVENT_INITIALIZATION in MotionMaster + allow public flag access"
This reverts commit 825c88e85adbeb788ac903667632faeed99870e4.
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Movement/MotionMaster.cpp | 5 | ||||
| -rw-r--r-- | src/server/game/Movement/MotionMaster.h | 9 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index b26d769da59..4fdae221e41 100644 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -304,10 +304,7 @@ void MotionMaster::Update(uint32 diff) if (HasFlag(MOTIONMASTER_FLAG_STATIC_INITIALIZATION_PENDING) && IsStatic(top)) { RemoveFlag(MOTIONMASTER_FLAG_STATIC_INITIALIZATION_PENDING); - if (!HasFlag(MOTIONMASTER_FLAG_STATIC_PREVENT_INITIALIZATION)) - top->Initialize(_owner); - else - RemoveFlag(MOTIONMASTER_FLAG_STATIC_PREVENT_INITIALIZATION); + top->Initialize(_owner); } if (top->HasFlag(MOVEMENTGENERATOR_FLAG_INITIALIZATION_PENDING)) top->Initialize(_owner); diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h index 91aeadc6c03..6f4957c37a3 100644 --- a/src/server/game/Movement/MotionMaster.h +++ b/src/server/game/Movement/MotionMaster.h @@ -49,7 +49,6 @@ enum MotionMasterFlags : uint8 MOTIONMASTER_FLAG_STATIC_INITIALIZATION_PENDING = 0x2, // Static movement (MOTION_SLOT_DEFAULT) hasn't been initialized MOTIONMASTER_FLAG_INITIALIZATION_PENDING = 0x4, // MotionMaster is stalled until signaled MOTIONMASTER_FLAG_INITIALIZING = 0x8, // MotionMaster is initializing - MOTIONMASTER_FLAG_STATIC_PREVENT_INITIALIZATION = 0x10, MOTIONMASTER_FLAG_DELAYED = MOTIONMASTER_FLAG_UPDATE | MOTIONMASTER_FLAG_INITIALIZATION_PENDING }; @@ -195,15 +194,15 @@ class TC_GAME_API MotionMaster void MoveFormation(Unit* leader, float range, float angle, uint32 point1, uint32 point2); void LaunchMoveSpline(std::function<void(Movement::MoveSplineInit& init)>&& initializer, uint32 id = 0, MovementGeneratorPriority priority = MOTION_PRIORITY_NORMAL, MovementGeneratorType type = EFFECT_MOTION_TYPE); - - void AddFlag(uint8 const flag) { _flags |= flag; } - bool HasFlag(uint8 const flag) const { return (_flags & flag) != 0; } - void RemoveFlag(uint8 const flag) { _flags &= ~flag; } private: typedef std::unique_ptr<MovementGenerator, MovementGeneratorDeleter> MovementGeneratorPointer; typedef std::multiset<MovementGenerator*, MovementGeneratorComparator> MotionMasterContainer; typedef std::unordered_multimap<uint32, MovementGenerator const*> MotionMasterUnitStatesContainer; + void AddFlag(uint8 const flag) { _flags |= flag; } + bool HasFlag(uint8 const flag) const { return (_flags & flag) != 0; } + void RemoveFlag(uint8 const flag) { _flags &= ~flag; } + void ResolveDelayedActions(); void Remove(MotionMasterContainer::iterator iterator, bool active, bool movementInform); void Pop(bool active, bool movementInform); |
