mirror of https://github.com/ppy/osu
Fix incorrect hat logic; add support for first barline omission
This commit is contained in:
parent
0f9ff32cdc
commit
210fecc951
|
@ -84,17 +84,25 @@ protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint,
|
|||
if (!firstBeat.HasValue || beatIndex < firstBeat)
|
||||
firstBeat = Math.Max(0, (beatIndex / 16 + 1) * 16);
|
||||
|
||||
if (beatIndex > firstBeat)
|
||||
if (beatIndex >= firstBeat)
|
||||
{
|
||||
if (beatIndex % 16 == 0)
|
||||
if (beatIndex % 16 == 0 && (beatIndex > firstBeat || !effectPoint.OmitFirstBarLine))
|
||||
finishSample?.Play();
|
||||
|
||||
if (beatIndex % 2 == 0)
|
||||
kickSample?.Play();
|
||||
else if (beatIndex % 2 == 1)
|
||||
clapSample?.Play();
|
||||
else
|
||||
hatSample?.Play();
|
||||
switch (beatIndex % (int)timingPoint.TimeSignature)
|
||||
{
|
||||
case 0:
|
||||
kickSample?.Play();
|
||||
break;
|
||||
|
||||
case 2:
|
||||
clapSample?.Play();
|
||||
break;
|
||||
|
||||
default:
|
||||
hatSample?.Play();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue