mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Fix PP counter showing incorrect values with rate adjustment mods
This commit is contained in:
@ -48,6 +48,9 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
[CanBeNull]
|
[CanBeNull]
|
||||||
private GameplayState gameplayState { get; set; }
|
private GameplayState gameplayState { get; set; }
|
||||||
|
|
||||||
|
[Resolved(CanBeNull = true)]
|
||||||
|
private GameplayClock gameplayClock { get; set; }
|
||||||
|
|
||||||
[CanBeNull]
|
[CanBeNull]
|
||||||
private List<TimedDifficultyAttributes> timedAttributes;
|
private List<TimedDifficultyAttributes> timedAttributes;
|
||||||
|
|
||||||
@ -133,10 +136,12 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
[CanBeNull]
|
[CanBeNull]
|
||||||
private DifficultyAttributes getAttributeAtTime(JudgementResult judgement)
|
private DifficultyAttributes getAttributeAtTime(JudgementResult judgement)
|
||||||
{
|
{
|
||||||
if (timedAttributes == null || timedAttributes.Count == 0)
|
if (timedAttributes == null || timedAttributes.Count == 0 || gameplayClock == null)
|
||||||
return 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)
|
if (attribIndex < 0)
|
||||||
attribIndex = ~attribIndex - 1;
|
attribIndex = ~attribIndex - 1;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user