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

Merge branch 'master' into catcher-area-file-cleanup

This commit is contained in:
Dean Herbert 2020-03-14 15:41:13 +09:00
commit 1523c4c63f
3 changed files with 23 additions and 13 deletions

View File

@ -23,6 +23,8 @@ namespace osu.Game.Rulesets.Catch.Difficulty
protected override int SectionLength => 750;
private float halfCatcherWidth;
public CatchDifficultyCalculator(Ruleset ruleset, WorkingBeatmap beatmap)
: base(ruleset, beatmap)
{
@ -48,14 +50,6 @@ namespace osu.Game.Rulesets.Catch.Difficulty
protected override IEnumerable<DifficultyHitObject> CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate)
{
float halfCatchWidth;
using (var catcher = new Catcher(beatmap.BeatmapInfo.BaseDifficulty))
{
halfCatchWidth = catcher.CatchWidth * 0.5f;
halfCatchWidth *= 0.8f; // We're only using 80% of the catcher's width to simulate imperfect gameplay.
}
CatchHitObject lastObject = null;
// In 2B beatmaps, it is possible that a normal Fruit is placed in the middle of a JuiceStream.
@ -69,16 +63,25 @@ namespace osu.Game.Rulesets.Catch.Difficulty
continue;
if (lastObject != null)
yield return new CatchDifficultyHitObject(hitObject, lastObject, clockRate, halfCatchWidth);
yield return new CatchDifficultyHitObject(hitObject, lastObject, clockRate, halfCatcherWidth);
lastObject = hitObject;
}
}
protected override Skill[] CreateSkills(IBeatmap beatmap) => new Skill[]
protected override Skill[] CreateSkills(IBeatmap beatmap)
{
new Movement(),
};
using (var catcher = new Catcher(beatmap.BeatmapInfo.BaseDifficulty))
{
halfCatcherWidth = catcher.CatchWidth * 0.5f;
halfCatcherWidth *= 0.8f; // We're only using 80% of the catcher's width to simulate imperfect gameplay.
}
return new Skill[]
{
new Movement(halfCatcherWidth),
};
}
protected override Mod[] DifficultyAdjustmentMods => new Mod[]
{

View File

@ -20,9 +20,16 @@ namespace osu.Game.Rulesets.Catch.Difficulty.Skills
protected override double DecayWeight => 0.94;
protected readonly float HalfCatcherWidth;
private float? lastPlayerPosition;
private float lastDistanceMoved;
public Movement(float halfCatcherWidth)
{
HalfCatcherWidth = halfCatcherWidth;
}
protected override double StrainValueOf(DifficultyHitObject current)
{
var catchCurrent = (CatchDifficultyHitObject)current;

View File

@ -126,7 +126,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
if (split.Length > 7)
{
length = Math.Max(0, Parsing.ParseDouble(split[7]));
length = Math.Max(0, Parsing.ParseDouble(split[7], Parsing.MAX_COORDINATE_VALUE));
if (length == 0)
length = null;
}