mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 12:47:18 +08:00
Fix PP counter showing incorrect values with rate adjustment mods
This commit is contained in:
parent
6f941a8916
commit
eaeee80a26
@ -48,6 +48,9 @@ namespace osu.Game.Screens.Play.HUD
|
||||
[CanBeNull]
|
||||
private GameplayState gameplayState { get; set; }
|
||||
|
||||
[Resolved(CanBeNull = true)]
|
||||
private GameplayClock gameplayClock { get; set; }
|
||||
|
||||
[CanBeNull]
|
||||
private List<TimedDifficultyAttributes> timedAttributes;
|
||||
|
||||
@ -133,10 +136,12 @@ namespace osu.Game.Screens.Play.HUD
|
||||
[CanBeNull]
|
||||
private DifficultyAttributes getAttributeAtTime(JudgementResult judgement)
|
||||
{
|
||||
if (timedAttributes == null || timedAttributes.Count == 0)
|
||||
if (timedAttributes == null || timedAttributes.Count == 0 || gameplayClock == null)
|
||||
return null;
|
||||
|
||||
int attribIndex = timedAttributes.BinarySearch(new TimedDifficultyAttributes(judgement.HitObject.GetEndTime(), null));
|
||||
double judgementTime = judgement.HitObject.GetEndTime() / gameplayClock.TrueGameplayRate;
|
||||
|
||||
int attribIndex = timedAttributes.BinarySearch(new TimedDifficultyAttributes(judgementTime, null));
|
||||
if (attribIndex < 0)
|
||||
attribIndex = ~attribIndex - 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user