mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:52:55 +08:00
Remove try-finally
This commit is contained in:
parent
a06516c900
commit
59e9c2639a
@ -114,8 +114,6 @@ namespace osu.Game.Rulesets.UI
|
||||
// our goal is to catch up to the time provided by the parent clock.
|
||||
var proposedTime = parentGameplayClock.CurrentTime;
|
||||
|
||||
try
|
||||
{
|
||||
if (FrameStablePlayback)
|
||||
// if we require frame stability, the proposed time will be adjusted to move at most one known
|
||||
// frame interval in the current direction.
|
||||
@ -123,11 +121,9 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
if (hasReplayAttached)
|
||||
state = updateReplay(ref proposedTime);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
if (proposedTime != manualClock.CurrentTime)
|
||||
direction = proposedTime > manualClock.CurrentTime ? 1 : -1;
|
||||
direction = proposedTime >= manualClock.CurrentTime ? 1 : -1;
|
||||
|
||||
manualClock.CurrentTime = proposedTime;
|
||||
manualClock.Rate = Math.Abs(parentGameplayClock.Rate) * direction;
|
||||
@ -145,7 +141,6 @@ namespace osu.Game.Rulesets.UI
|
||||
// to ensure that the its time is valid for our children before input is processed
|
||||
framedClock.ProcessFrame();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attempt to advance replay playback for a given time.
|
||||
|
Loading…
Reference in New Issue
Block a user