From 195b6642e62438ad3c08b02d8df5b4e69b84dc14 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Thu, 1 Mar 2018 01:45:41 +0900 Subject: [PATCH] Reimplement important frames --- .../Replays/CatchFramedReplayInputHandler.cs | 2 ++ .../Replays/ManiaFramedReplayInputHandler.cs | 3 +++ osu.Game.Rulesets.Osu/Replays/OsuReplayInputHandler.cs | 3 +++ .../Replays/TaikoFramedReplayInputHandler.cs | 3 +++ 4 files changed, 11 insertions(+) diff --git a/osu.Game.Rulesets.Catch/Replays/CatchFramedReplayInputHandler.cs b/osu.Game.Rulesets.Catch/Replays/CatchFramedReplayInputHandler.cs index 795a859f5f..9c0d05d4cd 100644 --- a/osu.Game.Rulesets.Catch/Replays/CatchFramedReplayInputHandler.cs +++ b/osu.Game.Rulesets.Catch/Replays/CatchFramedReplayInputHandler.cs @@ -15,6 +15,8 @@ namespace osu.Game.Rulesets.Catch.Replays { } + protected override bool IsImportant(CatchReplayFrame frame) => frame.X > 0; + protected float? Position { get diff --git a/osu.Game.Rulesets.Mania/Replays/ManiaFramedReplayInputHandler.cs b/osu.Game.Rulesets.Mania/Replays/ManiaFramedReplayInputHandler.cs index fb9ae37831..3541561418 100644 --- a/osu.Game.Rulesets.Mania/Replays/ManiaFramedReplayInputHandler.cs +++ b/osu.Game.Rulesets.Mania/Replays/ManiaFramedReplayInputHandler.cs @@ -2,6 +2,7 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; +using System.Linq; using osu.Framework.Input; using osu.Game.Rulesets.Replays; @@ -14,6 +15,8 @@ namespace osu.Game.Rulesets.Mania.Replays { } + protected override bool IsImportant(ManiaReplayFrame frame) => frame.Actions.Any(); + public override List GetPendingStates() => new List { new ReplayState { PressedActions = CurrentFrame.Actions } }; } } diff --git a/osu.Game.Rulesets.Osu/Replays/OsuReplayInputHandler.cs b/osu.Game.Rulesets.Osu/Replays/OsuReplayInputHandler.cs index aef02dad7e..0a61b0f199 100644 --- a/osu.Game.Rulesets.Osu/Replays/OsuReplayInputHandler.cs +++ b/osu.Game.Rulesets.Osu/Replays/OsuReplayInputHandler.cs @@ -2,6 +2,7 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; +using System.Linq; using osu.Framework.Input; using osu.Framework.MathUtils; using osu.Game.Rulesets.Replays; @@ -16,6 +17,8 @@ namespace osu.Game.Rulesets.Osu.Replays { } + protected override bool IsImportant(OsuReplayFrame frame) => frame.Actions.Any(); + protected Vector2? Position { get diff --git a/osu.Game.Rulesets.Taiko/Replays/TaikoFramedReplayInputHandler.cs b/osu.Game.Rulesets.Taiko/Replays/TaikoFramedReplayInputHandler.cs index 1c525dcda0..c80bddc304 100644 --- a/osu.Game.Rulesets.Taiko/Replays/TaikoFramedReplayInputHandler.cs +++ b/osu.Game.Rulesets.Taiko/Replays/TaikoFramedReplayInputHandler.cs @@ -3,6 +3,7 @@ using osu.Game.Rulesets.Replays; using System.Collections.Generic; +using System.Linq; using osu.Framework.Input; namespace osu.Game.Rulesets.Taiko.Replays @@ -14,6 +15,8 @@ namespace osu.Game.Rulesets.Taiko.Replays { } + protected override bool IsImportant(TaikoReplayFrame frame) => frame.Actions.Any(); + public override List GetPendingStates() => new List { new ReplayState { PressedActions = CurrentFrame.Actions } }; } }