mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
Fix Spun Out tests
Change 'unaffected by mods' test to use dynamic RPM value instead of a fixed value
This commit is contained in:
parent
df9535d195
commit
c1777f20e1
@ -48,7 +48,19 @@ namespace osu.Game.Rulesets.Osu.Tests.Mods
|
||||
PassCondition = () =>
|
||||
{
|
||||
var counter = Player.ChildrenOfType<SpinnerSpmCalculator>().SingleOrDefault();
|
||||
return counter != null && Precision.AlmostEquals(counter.Result.Value, 286, 1);
|
||||
var spinner = Player.ChildrenOfType<DrawableSpinner>().FirstOrDefault();
|
||||
|
||||
if (counter == null || spinner == null)
|
||||
return false;
|
||||
|
||||
// ignore cases where the spinner hasn't started as these lead to false-positives
|
||||
if (Precision.AlmostEquals(counter.Result.Value, 0, 1))
|
||||
return false;
|
||||
|
||||
double rateIndependentElapsedTime = spinner.Clock.ElapsedFrameTime / spinner.Clock.Rate;
|
||||
float rotationSpeed = (float)(1.01 * spinner.HitObject.SpinsRequired / spinner.HitObject.Duration);
|
||||
|
||||
return Precision.AlmostEquals(counter.Result.Value, rotationSpeed * 1000 * 60, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user