@@ -21,6 +21,38 @@ public class DebugFeature
2121 private static object _debugFeatureOriginal ;
2222 private static System . Type _debugFeatureType ;
2323
24+ private static void GameMoviePause ( bool pause )
25+ {
26+ var method = _gameMovie . GetType ( ) . GetMethod ( "Pause" ) ;
27+ if ( method . GetParameters ( ) . Length == 1 )
28+ {
29+ method . Invoke ( _gameMovie , [ pause ] ) ;
30+ }
31+ else
32+ {
33+ for ( int i = 0 ; i < 2 ; i ++ )
34+ {
35+ method . Invoke ( _gameMovie , [ i , pause ] ) ;
36+ }
37+ }
38+ }
39+
40+ private static void GameMovieSetSeekFrame ( double msec )
41+ {
42+ var method = _gameMovie . GetType ( ) . GetMethod ( "SetSeekFrame" ) ;
43+ if ( method . GetParameters ( ) . Length == 1 )
44+ {
45+ method . Invoke ( _gameMovie , [ msec ] ) ;
46+ }
47+ else
48+ {
49+ for ( int i = 0 ; i < 2 ; i ++ )
50+ {
51+ method . Invoke ( _gameMovie , [ i , msec ] ) ;
52+ }
53+ }
54+ }
55+
2456 [ HarmonyPatch ( typeof ( GameProcess ) , "OnStart" ) ]
2557 [ HarmonyPostfix ]
2658 public static void Init ( GameProcess __instance , MovieController ____gameMovie , GameMonitor [ ] ____monitors )
@@ -72,7 +104,7 @@ public static bool Pause
72104 }
73105
74106 SoundManager . PauseMusic ( value ) ;
75- _gameMovie . Pause ( value ) ;
107+ GameMoviePause ( value ) ;
76108 NotesManager . Pause ( value ) ;
77109 }
78110 }
@@ -134,7 +166,7 @@ private static class PolyFill
134166
135167 public static void DebugTimeSkip ( int addMsec )
136168 {
137- _gameMovie . Pause ( pauseFlag : true ) ;
169+ GameMoviePause ( true ) ;
138170 NotesManager . Pause ( true ) ;
139171 if ( addMsec >= 0 )
140172 {
@@ -145,7 +177,7 @@ public static void DebugTimeSkip(int addMsec)
145177 timer = timer + addMsec >= 0.0 ? timer + addMsec : 0.0 ;
146178 }
147179
148- _gameMovie . SetSeekFrame ( timer ) ;
180+ GameMovieSetSeekFrame ( timer ) ;
149181 SoundManager . SeekMusic ( ( int ) timer ) ;
150182 for ( int i = 0 ; i < _monitors . Length ; i ++ )
151183 {
@@ -158,11 +190,11 @@ public static void DebugTimeSkip(int addMsec)
158190 if ( ! isPause )
159191 {
160192 SoundManager . PauseMusic ( pause : false ) ;
161- _gameMovie . Pause ( pauseFlag : false ) ;
193+ GameMoviePause ( false ) ;
162194 }
163195 else
164196 {
165- _gameMovie . Pause ( pauseFlag : true ) ;
197+ GameMoviePause ( true ) ;
166198 }
167199
168200 _gameProcess . UpdateNotes ( ) ;
@@ -187,7 +219,7 @@ public static void Postfix(byte ____sequence)
187219 {
188220 isPause = ! isPause ;
189221 SoundManager . PauseMusic ( isPause ) ;
190- _gameMovie . Pause ( isPause ) ;
222+ GameMoviePause ( isPause ) ;
191223 NotesManager . Pause ( isPause ) ;
192224 }
193225 else if ( DebugInput . GetKeyDown ( KeyCode . LeftArrow ) || DebugInput . GetKeyDown ( KeyCode . RightArrow ) )
0 commit comments