mirror of
https://github.com/ppy/osu
synced 2025-03-23 19:36:56 +00:00
Merge branch 'master' into fix-unhide-hud-not-updating-stats
This commit is contained in:
commit
88ae9ca91d
@ -35,6 +35,18 @@ namespace osu.Game.Tests.Visual.Ranking
|
|||||||
createTest(new List<HitEvent>());
|
createTest(new List<HitEvent>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestMissesDontShow()
|
||||||
|
{
|
||||||
|
createTest(Enumerable.Range(0, 100).Select(i =>
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
return new HitEvent(0, HitResult.Perfect, new HitCircle(), new HitCircle(), null);
|
||||||
|
|
||||||
|
return new HitEvent(30, HitResult.Miss, new HitCircle(), new HitCircle(), null);
|
||||||
|
}).ToList());
|
||||||
|
}
|
||||||
|
|
||||||
private void createTest(List<HitEvent> events) => AddStep("create test", () =>
|
private void createTest(List<HitEvent> events) => AddStep("create test", () =>
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
|
@ -284,7 +284,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
// this is a special case to handle the "pivot" scenario.
|
// this is a special case to handle the "pivot" scenario.
|
||||||
// if we are precise scrolling in one direction then change our mind and scroll backwards,
|
// if we are precise scrolling in one direction then change our mind and scroll backwards,
|
||||||
// the existing accumulation should be applied in the inverse direction to maintain responsiveness.
|
// the existing accumulation should be applied in the inverse direction to maintain responsiveness.
|
||||||
if (Math.Sign(scrollAccumulation) != scrollDirection)
|
if (scrollAccumulation != 0 && Math.Sign(scrollAccumulation) != scrollDirection)
|
||||||
scrollAccumulation = scrollDirection * (precision - Math.Abs(scrollAccumulation));
|
scrollAccumulation = scrollDirection * (precision - Math.Abs(scrollAccumulation));
|
||||||
|
|
||||||
scrollAccumulation += scrollComponent * (e.IsPrecise ? 0.1 : 1);
|
scrollAccumulation += scrollComponent * (e.IsPrecise ? 0.1 : 1);
|
||||||
|
@ -48,7 +48,7 @@ namespace osu.Game.Screens.Ranking.Statistics
|
|||||||
/// <param name="hitEvents">The <see cref="HitEvent"/>s to display the timing distribution of.</param>
|
/// <param name="hitEvents">The <see cref="HitEvent"/>s to display the timing distribution of.</param>
|
||||||
public HitEventTimingDistributionGraph(IReadOnlyList<HitEvent> hitEvents)
|
public HitEventTimingDistributionGraph(IReadOnlyList<HitEvent> hitEvents)
|
||||||
{
|
{
|
||||||
this.hitEvents = hitEvents.Where(e => !(e.HitObject.HitWindows is HitWindows.EmptyHitWindows)).ToList();
|
this.hitEvents = hitEvents.Where(e => !(e.HitObject.HitWindows is HitWindows.EmptyHitWindows) && e.Result != HitResult.Miss).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
Loading…
Reference in New Issue
Block a user