1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 11:42:56 +08:00

Remove now-redundant velocity calculation

Velocity is computed from the up-to-date SV now.
This commit is contained in:
ekrctb 2022-05-08 21:54:14 +09:00
parent 37c9aac49f
commit 7daa3d8eb7

View File

@ -107,16 +107,13 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints.Components
// In case the required velocity is too large, the path is not preserved.
svBindable.Value = Math.Ceiling(requiredVelocity / svToVelocityFactor);
// Calculate the velocity using the resulting SV because `hitObject.Velocity` is not recomputed yet.
double velocity = svBindable.Value * svToVelocityFactor;
path.ConvertToSliderPath(hitObject.Path, hitObject.LegacyConvertedY, velocity);
path.ConvertToSliderPath(hitObject.Path, hitObject.LegacyConvertedY, hitObject.Velocity);
if (beatSnapProvider == null) return;
double endTime = hitObject.StartTime + path.Duration;
double snappedEndTime = beatSnapProvider.SnapTime(endTime, hitObject.StartTime);
hitObject.Path.ExpectedDistance.Value = (snappedEndTime - hitObject.StartTime) * velocity;
hitObject.Path.ExpectedDistance.Value = (snappedEndTime - hitObject.StartTime) * hitObject.Velocity;
}
public Vector2 ToRelativePosition(Vector2 screenSpacePosition)