Fix drumroll completions always giving GREAT judgements

Due to requiredgoodhits/requiredgreathits being calculated prior to nested hitobjects.
This commit is contained in:
smoogipoo 2018-05-14 14:13:07 +09:00
parent 9515eb4281
commit 7d027098ec
1 changed files with 6 additions and 3 deletions

View File

@ -40,6 +40,8 @@ public class DrumRoll : TaikoHitObject, IHasEndTime
/// </summary>
private double tickSpacing = 100;
private float overallDifficulty = BeatmapDifficulty.DEFAULT_DIFFICULTY;
protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
{
base.ApplyDefaultsToSelf(controlPointInfo, difficulty);
@ -47,9 +49,7 @@ protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, B
TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime);
tickSpacing = timingPoint.BeatLength / TickRate;
RequiredGoodHits = NestedHitObjects.Count * Math.Min(0.15, 0.05 + 0.10 / 6 * difficulty.OverallDifficulty);
RequiredGreatHits = NestedHitObjects.Count * Math.Min(0.30, 0.10 + 0.20 / 6 * difficulty.OverallDifficulty);
overallDifficulty = difficulty.OverallDifficulty;
}
protected override void CreateNestedHitObjects()
@ -57,6 +57,9 @@ protected override void CreateNestedHitObjects()
base.CreateNestedHitObjects();
createTicks();
RequiredGoodHits = NestedHitObjects.Count * Math.Min(0.15, 0.05 + 0.10 / 6 * overallDifficulty);
RequiredGreatHits = NestedHitObjects.Count * Math.Min(0.30, 0.10 + 0.20 / 6 * overallDifficulty);
}
private void createTicks()