Skip to content

Commit a893fc9

Browse files
authored
0.6.0.102 - Fix Pause -> Resume made chart jumped to song start due to the main timer was not reset correctly (#912)
- [Fix] 0.6.0.101 made Pause -> Resume made chart jumped to song start due to the main timer was not reset correctly
1 parent 6867df3 commit a893fc9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

OpenTaiko/src/Stages/07.Game/CStage演奏画面共通.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,15 +2065,15 @@ public void Pause() {
20652065
this.actAVI.Pause();
20662066
}
20672067

2068-
public void Resume(int? msStartGameTime = null) {
2068+
public void Resume(long? msStartGameTime = null) {
20692069
OpenTaiko.TJA.t全チップの再生再開();
20702070
OpenTaiko.Timer.Resume();
2071-
OpenTaiko.Timer.Reset(); // これでPAUSE解除されるので、3行先の再開()は不要
2072-
if (msStartGameTime != null)
2073-
OpenTaiko.Timer.NowTimeMs = msStartGameTime.Value; // Debug表示のTime: 表記を正しくするために必要
2071+
msStartGameTime ??= OpenTaiko.Timer.NowTimeMs; // target time defaults to pre-pause time
2072+
OpenTaiko.Timer.Reset(); // reset internal pause timer
2073+
OpenTaiko.Timer.NowTimeMs = msStartGameTime.Value; // jump to target time
20742074
SoundManager.PlayTimer.Resume();
20752075
SoundManager.PlayTimer.Reset();
2076-
SoundManager.PlayTimer.NowTimeMs = OpenTaiko.Timer.NowTimeMs;
2076+
SoundManager.PlayTimer.NowTimeMs = OpenTaiko.Timer.NowTimeMs; // sync with game time
20772077

20782078
this.actAVI.Resume();
20792079
this.actPanel.Start();

0 commit comments

Comments
 (0)