mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 06:13:21 +08:00
Merge pull request #13941 from Henry-YSLin/update-TargetBeatContainer
Update `OsuModTarget` to take advantage of the new `BeatSyncedContainer`
This commit is contained in:
commit
f415dc18a7
@ -353,6 +353,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
public TargetBeatContainer(double firstHitTime)
|
public TargetBeatContainer(double firstHitTime)
|
||||||
{
|
{
|
||||||
this.firstHitTime = firstHitTime;
|
this.firstHitTime = firstHitTime;
|
||||||
|
AllowMistimedEventFiring = false;
|
||||||
Divisor = 1;
|
Divisor = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -374,8 +375,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
int timeSignature = (int)timingPoint.TimeSignature;
|
int timeSignature = (int)timingPoint.TimeSignature;
|
||||||
|
|
||||||
// play metronome from one measure before the first object.
|
// play metronome from one measure before the first object.
|
||||||
// TODO: Use BeatSyncClock from https://github.com/ppy/osu/pull/13894.
|
if (BeatSyncClock.CurrentTime < firstHitTime - timingPoint.BeatLength * timeSignature)
|
||||||
if (Clock.CurrentTime < firstHitTime - timingPoint.BeatLength * timeSignature)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sample.Frequency.Value = beatIndex % timeSignature == 0 ? 1 : 0.5f;
|
sample.Frequency.Value = beatIndex % timeSignature == 0 ? 1 : 0.5f;
|
||||||
|
Loading…
Reference in New Issue
Block a user