mirror of
https://github.com/osukey/osukey.git
synced 2025-05-07 06:37:18 +09:00
Merge pull request #20658 from sw1tchbl4d3r/fix-17143
Fix legacy BpmMultiplier clamp value
This commit is contained in:
commit
1b2ee44131
@ -435,8 +435,10 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
addControlPoint(time, controlPoint, true);
|
addControlPoint(time, controlPoint, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int onlineRulesetID = beatmap.BeatmapInfo.Ruleset.OnlineID;
|
||||||
|
|
||||||
#pragma warning disable 618
|
#pragma warning disable 618
|
||||||
addControlPoint(time, new LegacyDifficultyControlPoint(beatLength)
|
addControlPoint(time, new LegacyDifficultyControlPoint(onlineRulesetID, beatLength)
|
||||||
#pragma warning restore 618
|
#pragma warning restore 618
|
||||||
{
|
{
|
||||||
SliderVelocity = speedMultiplier,
|
SliderVelocity = speedMultiplier,
|
||||||
@ -448,8 +450,6 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
OmitFirstBarLine = omitFirstBarSignature,
|
OmitFirstBarLine = omitFirstBarSignature,
|
||||||
};
|
};
|
||||||
|
|
||||||
int onlineRulesetID = beatmap.BeatmapInfo.Ruleset.OnlineID;
|
|
||||||
|
|
||||||
// osu!taiko and osu!mania use effect points rather than difficulty points for scroll speed adjustments.
|
// osu!taiko and osu!mania use effect points rather than difficulty points for scroll speed adjustments.
|
||||||
if (onlineRulesetID == 1 || onlineRulesetID == 3)
|
if (onlineRulesetID == 1 || onlineRulesetID == 3)
|
||||||
effectPoint.ScrollSpeed = speedMultiplier;
|
effectPoint.ScrollSpeed = speedMultiplier;
|
||||||
|
@ -174,11 +174,15 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool GenerateTicks { get; private set; } = true;
|
public bool GenerateTicks { get; private set; } = true;
|
||||||
|
|
||||||
public LegacyDifficultyControlPoint(double beatLength)
|
public LegacyDifficultyControlPoint(int rulesetId, double beatLength)
|
||||||
: this()
|
: this()
|
||||||
{
|
{
|
||||||
// Note: In stable, the division occurs on floats, but with compiler optimisations turned on actually seems to occur on doubles via some .NET black magic (possibly inlining?).
|
// Note: In stable, the division occurs on floats, but with compiler optimisations turned on actually seems to occur on doubles via some .NET black magic (possibly inlining?).
|
||||||
BpmMultiplier = beatLength < 0 ? Math.Clamp((float)-beatLength, 10, 10000) / 100.0 : 1;
|
if (rulesetId == 1 || rulesetId == 3)
|
||||||
|
BpmMultiplier = beatLength < 0 ? Math.Clamp((float)-beatLength, 10, 10000) / 100.0 : 1;
|
||||||
|
else
|
||||||
|
BpmMultiplier = beatLength < 0 ? Math.Clamp((float)-beatLength, 10, 1000) / 100.0 : 1;
|
||||||
|
|
||||||
GenerateTicks = !double.IsNaN(beatLength);
|
GenerateTicks = !double.IsNaN(beatLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user