1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 16:43:00 +08:00

Use StageDefinition to determine special column in ManiaReplayFrame

This commit is contained in:
smoogipoo 2018-03-01 00:36:32 +09:00
parent b8b869e8b7
commit a02eaf0e94

View File

@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Mania.Replays
// NB: Via co-op mod, osu-stable can have two stages with floor(col/2) and ceil(col/2) columns. This will need special handling
// elsewhere in the game if we do choose to support the old co-op mod anyway. For now, assume that there is only one stage.
bool isSpecialColumn(int column) => converter.TargetColumns % 2 == 1 && column == converter.TargetColumns / 2;
var stage = new StageDefinition { Columns = converter.TargetColumns };
var normalAction = ManiaAction.Key1;
var specialAction = ManiaAction.Special1;
@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Mania.Replays
{
Actions.Add((activeColumns & 1) > 0 ? specialAction : normalAction);
if (isSpecialColumn(counter))
if (stage.IsSpecialColumn(counter))
normalAction++;
else
specialAction++;