1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 04:02:59 +08:00

Fix some legacy cases

This commit is contained in:
Dean Herbert 2018-07-16 16:26:37 +09:00
parent dbc538abbe
commit 98cddc0c04
2 changed files with 12 additions and 4 deletions

View File

@ -43,7 +43,7 @@ namespace osu.Game.Rulesets.Mania.Replays
{
var isSpecial = stage.IsSpecialColumn(counter);
if (activeColumns.HasFlag(1))
if ((activeColumns & 1) > 0)
Actions.Add(isSpecial ? specialAction : normalAction);
if (isSpecial)

View File

@ -305,9 +305,9 @@ namespace osu.Game.Beatmaps.Formats
bool omitFirstBarSignature = false;
if (split.Length >= 8)
{
int effectFlags = int.Parse(split[7]);
kiaiMode = effectFlags.HasFlag(1);
omitFirstBarSignature = effectFlags.HasFlag(8);
EffectFlags effectFlags = (EffectFlags)int.Parse(split[7]);
kiaiMode = effectFlags.HasFlag(EffectFlags.Kiai);
omitFirstBarSignature = effectFlags.HasFlag(EffectFlags.OmitFirstBarLine);
}
string stringSampleSet = sampleSet.ToString().ToLower();
@ -405,5 +405,13 @@ namespace osu.Game.Beatmaps.Formats
private double getOffsetTime() => ApplyOffsets ? offset : 0;
private double getOffsetTime(double time) => time + (ApplyOffsets ? offset : 0);
[Flags]
internal enum EffectFlags
{
None = 0,
Kiai = 1,
OmitFirstBarLine = 8
}
}
}