diff --git a/osu.Game.Rulesets.Mania/Replays/ManiaAutoGenerator.cs b/osu.Game.Rulesets.Mania/Replays/ManiaAutoGenerator.cs index 58fb43aa83..ca80bf8413 100644 --- a/osu.Game.Rulesets.Mania/Replays/ManiaAutoGenerator.cs +++ b/osu.Game.Rulesets.Mania/Replays/ManiaAutoGenerator.cs @@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Mania.Replays public override Replay Generate() { // Todo: Realistically this shouldn't be needed, but the first frame is skipped with the way replays are currently handled - Replay.Frames.Add(new ManiaReplayFrame(-100000, null, null, ReplayButtonState.None)); + Replay.Frames.Add(new ManiaReplayFrame(-100000, 0)); double[] holdEndTimes = new double[availableColumns]; for (int i = 0; i < availableColumns; i++) @@ -60,7 +60,7 @@ namespace osu.Game.Rulesets.Mania.Replays activeColumns |= 1 << obj.Column; } - Replay.Frames.Add(new ManiaReplayFrame(groupTime, activeColumns, null, ReplayButtonState.None)); + Replay.Frames.Add(new ManiaReplayFrame(groupTime, activeColumns)); // Add the release frames. We can't do this with the loop above because we need activeColumns to be fully populated foreach (var obj in objGroup.GroupBy(h => (h as IHasEndTime)?.EndTime ?? h.StartTime + release_delay).OrderBy(h => h.Key)) @@ -74,14 +74,14 @@ namespace osu.Game.Rulesets.Mania.Replays activeColumnsAtEnd |= 1 << i; } - Replay.Frames.Add(new ManiaReplayFrame(groupEndTime, activeColumnsAtEnd, 0, ReplayButtonState.None)); + Replay.Frames.Add(new ManiaReplayFrame(groupEndTime, activeColumnsAtEnd)); } } Replay.Frames = Replay.Frames // Pick the maximum activeColumns for all frames at the same time .GroupBy(f => f.Time) - .Select(g => new ManiaReplayFrame(g.First().Time, maxMouseX(g), 0, ReplayButtonState.None)) + .Select(g => new ManiaReplayFrame(g.First().Time, maxMouseX(g))) .Cast() // The addition of release frames above maybe result in unordered frames, but we need them ordered .OrderBy(f => f.Time) @@ -95,7 +95,7 @@ namespace osu.Game.Rulesets.Mania.Replays /// /// The grouping to search. /// The maximum by count of bits. - private float maxMouseX(IGrouping group) + private int maxMouseX(IGrouping group) { int currentCount = -1; int currentMax = 0; diff --git a/osu.Game.Rulesets.Mania/Replays/ManiaReplayFrame.cs b/osu.Game.Rulesets.Mania/Replays/ManiaReplayFrame.cs index c27ffa1875..8473d23b89 100644 --- a/osu.Game.Rulesets.Mania/Replays/ManiaReplayFrame.cs +++ b/osu.Game.Rulesets.Mania/Replays/ManiaReplayFrame.cs @@ -9,8 +9,8 @@ namespace osu.Game.Rulesets.Mania.Replays { public override bool IsImportant => MouseX > 0; - public ManiaReplayFrame(double time, float? mouseX, float? mouseY, ReplayButtonState buttonState) - : base(time, mouseX, mouseY, buttonState) + public ManiaReplayFrame(double time, int activeColumns) + : base(time, (float)activeColumns, null, ReplayButtonState.None) { } }