1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 03:42:57 +08:00

Fix legacy tick distance in JuiceStream generation

This commit is contained in:
Dan Balasescu 2023-12-05 15:09:55 +09:00
parent b90de83f33
commit 7d602c792d
No known key found for this signature in database
5 changed files with 85 additions and 1 deletions

View File

@ -29,6 +29,7 @@ namespace osu.Game.Rulesets.Catch.Tests
[TestCase("basic-hyperdash")]
[TestCase("pixel-jump")]
[TestCase("tiny-ticks")]
[TestCase("v8-tick-distance")]
public new void Test(string name, params Type[] mods) => base.Test(name, mods);
protected override IEnumerable<ConvertValue> CreateConvertValue(HitObject hitObject)

View File

@ -9,6 +9,7 @@ using System.Threading;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Objects;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Game.Beatmaps.Legacy;
namespace osu.Game.Rulesets.Catch.Beatmaps
{
@ -42,6 +43,9 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
NewCombo = comboData?.NewCombo ?? false,
ComboOffset = comboData?.ComboOffset ?? 0,
LegacyConvertedY = yPositionData?.Y ?? CatchHitObject.DEFAULT_LEGACY_CONVERT_Y,
// prior to v8, speed multipliers don't adjust for how many ticks are generated over the same distance.
// this results in more (or less) ticks being generated in <v8 maps for the same time duration.
TickDistanceMultiplier = beatmap.BeatmapInfo.BeatmapVersion < 8 ? 1 : ((LegacyControlPointInfo)beatmap.ControlPointInfo).DifficultyPointAt(obj.StartTime).SliderVelocity,
SliderVelocityMultiplier = sliderVelocityData?.SliderVelocityMultiplier ?? 1
}.Yield();

View File

@ -41,6 +41,12 @@ namespace osu.Game.Rulesets.Catch.Objects
set => SliderVelocityMultiplierBindable.Value = value;
}
/// <summary>
/// An extra multiplier that affects the number of <see cref="Droplet"/>s generated by this <see cref="JuiceStream"/>.
/// An increase in this value increases <see cref="TickDistance"/>, which reduces the number of ticks generated.
/// </summary>
public double TickDistanceMultiplier = 1;
[JsonIgnore]
private double velocityFactor;
@ -51,7 +57,7 @@ namespace osu.Game.Rulesets.Catch.Objects
public double Velocity => velocityFactor * SliderVelocityMultiplier;
[JsonIgnore]
public double TickDistance => tickDistanceFactor * SliderVelocityMultiplier;
public double TickDistance => tickDistanceFactor * TickDistanceMultiplier;
/// <summary>
/// The length of one span of this <see cref="JuiceStream"/>.

View File

@ -0,0 +1,54 @@
{
"Mappings": [
{
"StartTime": 81593.0,
"Objects": [
{
"StartTime": 81593.0,
"Position": 384.0,
"HyperDash": false
},
{
"StartTime": 81652.0,
"Position": 377.608948,
"HyperDash": false
},
{
"StartTime": 81712.0,
"Position": 390.3638,
"HyperDash": false
},
{
"StartTime": 81772.0,
"Position": 407.118683,
"HyperDash": false
},
{
"StartTime": 81832.0,
"Position": 433.873535,
"HyperDash": false
},
{
"StartTime": 81891.0,
"Position": 444.482483,
"HyperDash": false
},
{
"StartTime": 81951.0,
"Position": 437.237366,
"HyperDash": false
},
{
"StartTime": 82011.0,
"Position": 443.992218,
"HyperDash": false
},
{
"StartTime": 82107.0,
"Position": 459.0,
"HyperDash": false
}
]
}
]
}

View File

@ -0,0 +1,19 @@
osu file format v7
[General]
StackLeniency: 0.7
Mode: 0
[Difficulty]
HPDrainRate:5
CircleSize:4
OverallDifficulty:8
SliderMultiplier:1
SliderTickRate:1
[TimingPoints]
336,342.857142857143,4,1,0,100,1,0
81588,-200,4,2,0,100,0,0
[HitObjects]
384,72,81593,2,12,B|464:72,1,75,4|4