mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Movement: Spline code cleanup
* Remove unneccessary reserve in MoveSplineInitArgs constructor - MoveTo always resizes it * Remove unused function computeDuration * Split cyclic spline reinitialization to separate function * Don't expose TransportPathTransform outside of MoveSplineInit * Ensure function argument names are the same in declaration and definition
This commit is contained in:
@@ -941,6 +941,8 @@ void MotionMaster::MoveCirclePath(float x, float y, float z, float radius, bool
|
||||
Position const& pos = { x, y, z, 0.0f };
|
||||
float angle = pos.GetAbsoluteAngle(_owner->GetPositionX(), _owner->GetPositionY());
|
||||
|
||||
init.Path().reserve(stepCount + 1);
|
||||
|
||||
// add the owner's current position as starting point as it gets removed after entering the cycle
|
||||
init.Path().emplace_back(_owner->GetPositionX(), _owner->GetPositionY(), _owner->GetPositionZ());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user