mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 02:42:54 +08:00
Remove now-redundant velocity calculation
Velocity is computed from the up-to-date SV now.
This commit is contained in:
parent
37c9aac49f
commit
7daa3d8eb7
@ -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.
|
// In case the required velocity is too large, the path is not preserved.
|
||||||
svBindable.Value = Math.Ceiling(requiredVelocity / svToVelocityFactor);
|
svBindable.Value = Math.Ceiling(requiredVelocity / svToVelocityFactor);
|
||||||
|
|
||||||
// Calculate the velocity using the resulting SV because `hitObject.Velocity` is not recomputed yet.
|
path.ConvertToSliderPath(hitObject.Path, hitObject.LegacyConvertedY, hitObject.Velocity);
|
||||||
double velocity = svBindable.Value * svToVelocityFactor;
|
|
||||||
|
|
||||||
path.ConvertToSliderPath(hitObject.Path, hitObject.LegacyConvertedY, velocity);
|
|
||||||
|
|
||||||
if (beatSnapProvider == null) return;
|
if (beatSnapProvider == null) return;
|
||||||
|
|
||||||
double endTime = hitObject.StartTime + path.Duration;
|
double endTime = hitObject.StartTime + path.Duration;
|
||||||
double snappedEndTime = beatSnapProvider.SnapTime(endTime, hitObject.StartTime);
|
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)
|
public Vector2 ToRelativePosition(Vector2 screenSpacePosition)
|
||||||
|
Loading…
Reference in New Issue
Block a user