mirror of
https://github.com/ppy/osu
synced 2024-12-14 10:57:41 +00:00
Fix case of zero rate calculating a zero true gameplay rate
This commit is contained in:
parent
1be3b74ff3
commit
e6b449fe0b
@ -14,7 +14,7 @@ namespace osu.Game.Screens.Play
|
|||||||
public static double GetTrueGameplayRate(this IGameplayClock clock)
|
public static double GetTrueGameplayRate(this IGameplayClock clock)
|
||||||
{
|
{
|
||||||
// To handle rewind, we still want to maintain the same direction as the underlying clock.
|
// To handle rewind, we still want to maintain the same direction as the underlying clock.
|
||||||
double rate = Math.Sign(clock.Rate);
|
double rate = clock.Rate == 0 ? 1 : Math.Sign(clock.Rate);
|
||||||
|
|
||||||
return rate
|
return rate
|
||||||
* clock.GameplayAdjustments.AggregateFrequency.Value
|
* clock.GameplayAdjustments.AggregateFrequency.Value
|
||||||
|
Loading…
Reference in New Issue
Block a user