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:
Shauren
2025-06-17 23:09:08 +02:00
parent 6502efbae8
commit e02e8a4742
8 changed files with 102 additions and 110 deletions

View File

@@ -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());