Core/Units: Removed spline speed limit for MoveJumpWithGravity (#28142)

This commit is contained in:
Teleqraph
2022-07-24 22:20:35 +02:00
committed by GitHub
parent 3598d280ff
commit 96295cfc5f
2 changed files with 7 additions and 0 deletions

View File

@@ -873,6 +873,7 @@ void MotionMaster::MoveJumpWithGravity(Position const& pos, float speedXY, float
init.SetParabolicVerticalAcceleration(gravity, 0);
init.SetUncompressed();
init.SetVelocity(speedXY);
init.SetUnlimitedSpeed();
if (hasOrientation)
init.SetFacing(pos.GetOrientation());
if (effect)

View File

@@ -146,6 +146,11 @@ namespace Movement
*/
void SetOrientationFixed(bool enable);
/* Enables no-speed limit
* if not set, the speed will be limited by certain flags to 50.0f, and otherwise 28.0f
*/
void SetUnlimitedSpeed();
/* Sets the velocity (in case you want to have custom movement velocity)
* if no set, speed will be selected based on unit's speeds and current movement mode
* Has no effect if falling mode enabled
@@ -176,6 +181,7 @@ namespace Movement
inline void MoveSplineInit::SetTransportEnter() { args.flags.EnableTransportEnter(); }
inline void MoveSplineInit::SetTransportExit() { args.flags.EnableTransportExit(); }
inline void MoveSplineInit::SetOrientationFixed(bool enable) { args.flags.orientationFixed = enable; }
inline void MoveSplineInit::SetUnlimitedSpeed() { args.flags.unlimitedSpeed = true; }
inline void MoveSplineInit::SetParabolic(float amplitude, float time_shift)
{