diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-04-25 00:42:16 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-04-25 00:42:16 +0200 |
commit | dad976beb4f1a865e5df5d6f03da1d00d266e1fc (patch) | |
tree | 165190844b4094fd023d67f70529e0b002121647 /src/server/game/Movement/MotionMaster.cpp | |
parent | e0e1b6a4098badb6f48ba1d5cb1cc1739e310959 (diff) |
Core/Movement: Migrate scripts using GetMotionMaster()->MoveSmoothPath to GetMotionMaster()->MovePath and kill it (they now have the same capabilities)
Diffstat (limited to 'src/server/game/Movement/MotionMaster.cpp')
-rw-r--r-- | src/server/game/Movement/MotionMaster.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index e60f30741b6..c1f042111cc 100644 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -990,32 +990,6 @@ void MotionMaster::MoveCirclePath(float x, float y, float z, float radius, bool Add(new GenericMovementGenerator(std::move(initializer), EFFECT_MOTION_TYPE, 0, { .Duration = duration, .ScriptResult = std::move(scriptResult) })); } -void MotionMaster::MoveSmoothPath(uint32 pointId, Position const* pathPoints, size_t pathSize, bool walk, bool fly) -{ - Movement::PointsArray path; - path.reserve(pathSize); - std::transform(pathPoints, pathPoints + pathSize, std::back_inserter(path), [](Position const& point) - { - return G3D::Vector3(point.GetPositionX(), point.GetPositionY(), point.GetPositionZ()); - }); - std::function<void(Movement::MoveSplineInit&)> initializer = [=](Movement::MoveSplineInit& init) - { - init.MovebyPath(path); - init.SetWalk(walk); - if (fly) - { - init.SetFly(); - init.SetUncompressed(); - init.SetSmooth(); - } - }; - - // This code is not correct - // GenericMovementGenerator does not affect UNIT_STATE_ROAMING_MOVE - // need to call PointMovementGenerator with various pointIds - Add(new GenericMovementGenerator(std::move(initializer), EFFECT_MOTION_TYPE, pointId)); -} - void MotionMaster::MoveAlongSplineChain(uint32 pointId, uint16 dbChainId, bool walk) { Creature* owner = _owner->ToCreature(); |