Skip to content

Commit 6ae82c5

Browse files
committed
Fix circle scale not matching stable due to missing multiplier
This multiplier has to exist. I'm not guaranteeing that the rest is correct here. Should we be doing proper cross-testing on this? Maybe, but it's going to be hard to get right. We could likely check as far as "game pixels", but there's still a chance that the osu-framework could be doing something weird in the rest of the hierarchy where playfield scale is involved. Closes ppy#25162. Tested to fix the linked replay.
1 parent 54da6f1 commit 6ae82c5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs

+11-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,17 @@ protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, I
155155
// This adjustment is necessary for AR>10, otherwise TimePreempt can become smaller leading to hitcircles not fully fading in.
156156
TimeFadeIn = 400 * Math.Min(1, TimePreempt / PREEMPT_MIN);
157157

158-
Scale = (1.0f - 0.7f * (difficulty.CircleSize - 5) / 5) / 2;
158+
// The following comment is copied verbatim from osu-stable:
159+
//
160+
// Builds of osu! up to 2013-05-04 had the gamefield being rounded down, which caused incorrect radius calculations
161+
// in widescreen cases. This ratio adjusts to allow for old replays to work post-fix, which in turn increases the lenience
162+
// for all plays, but by an amount so small it should only be effective in replays.
163+
//
164+
// To match expectations of gameplay we need to apply this multiplier to circle scale. It's weird but is what it is.
165+
// It works out to under 1 game pixel and is generally not meaningful to gameplay, but is to replay playback accuracy.
166+
const float broken_gamefield_rounding_allowance = 1.00041f;
167+
168+
Scale = (1.0f - 0.7f * (difficulty.CircleSize - 5) / 5) / 2 * broken_gamefield_rounding_allowance;
159169
}
160170

161171
protected override HitWindows CreateHitWindows() => new OsuHitWindows();

0 commit comments

Comments
 (0)