1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-27 14:52:55 +08:00

Show smoke in replays

This commit is contained in:
Alden Wu 2022-09-18 17:55:06 -07:00
parent 613564b5b9
commit 06178104c8
2 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,7 @@ namespace osu.Game.Rulesets.Osu.Replays
Position = currentFrame.Position; Position = currentFrame.Position;
if (currentFrame.MouseLeft) Actions.Add(OsuAction.LeftButton); if (currentFrame.MouseLeft) Actions.Add(OsuAction.LeftButton);
if (currentFrame.MouseRight) Actions.Add(OsuAction.RightButton); if (currentFrame.MouseRight) Actions.Add(OsuAction.RightButton);
if (currentFrame.Smoke) Actions.Add(OsuAction.Smoke);
} }
public LegacyReplayFrame ToLegacy(IBeatmap beatmap) public LegacyReplayFrame ToLegacy(IBeatmap beatmap)
@ -41,6 +42,8 @@ namespace osu.Game.Rulesets.Osu.Replays
state |= ReplayButtonState.Left1; state |= ReplayButtonState.Left1;
if (Actions.Contains(OsuAction.RightButton)) if (Actions.Contains(OsuAction.RightButton))
state |= ReplayButtonState.Right1; state |= ReplayButtonState.Right1;
if (Actions.Contains(OsuAction.Smoke))
state |= ReplayButtonState.Smoke;
return new LegacyReplayFrame(Time, Position.X, Position.Y, state); return new LegacyReplayFrame(Time, Position.X, Position.Y, state);
} }

View File

@ -46,6 +46,10 @@ namespace osu.Game.Replays.Legacy
[IgnoreMember] [IgnoreMember]
public bool MouseRight2 => ButtonState.HasFlagFast(ReplayButtonState.Right2); public bool MouseRight2 => ButtonState.HasFlagFast(ReplayButtonState.Right2);
[JsonIgnore]
[IgnoreMember]
public bool Smoke => ButtonState.HasFlagFast(ReplayButtonState.Smoke);
[Key(3)] [Key(3)]
public ReplayButtonState ButtonState; public ReplayButtonState ButtonState;