55#ifdef CUTSCENE_RECORDER
66
77#include "driver2.h"
8+ #include "cutrecorder.h"
89
910#include "main.h"
1011#include "pad.h"
@@ -118,7 +119,7 @@ int CutRec_GotoChase(int number)
118119
119120void CutRec_Step ()
120121{
121- if (gCutsceneChaseAutoTest != 0 )
122+ if (gCutsceneChaseAutoTest != 0 && CutRec_IsPlaying () )
122123 {
123124 // goto previous chase
124125 if (Pads [0 ].dirnew & CAR_PAD_LEFT )
@@ -411,10 +412,7 @@ int CutRec_StorePingInfo(int cookieCount, int carId)
411412 PING_PACKET * buffer ;
412413 PING_PACKET * packet ;
413414
414- if (gCutsceneAsReplay == 0 )
415- return 0 ;
416-
417- if (CurrentGameMode == GAMEMODE_REPLAY || gInGameChaseActive != 0 )
415+ if (!CutRec_IsRecording ())
418416 return 0 ;
419417
420418 if (PingBufferPos < MAX_REPLAY_PINGS - 1 )
@@ -425,12 +423,16 @@ int CutRec_StorePingInfo(int cookieCount, int carId)
425423
426424 packet -> cookieCount = cookieCount ;
427425
426+ PingBuffer [PingBufferPos - 1 ] = * packet ;
427+
428428 // always finalize last ping
429429 packet = & NewPingBuffer [PingBufferPos ];
430430 packet -> frame = 0xffff ;
431431 packet -> carId = -1 ;
432432 packet -> cookieCount = -1 ;
433433
434+
435+
434436 return 1 ;
435437 }
436438
@@ -788,4 +790,20 @@ int CutRec_RecordPad(CAR_DATA* cp, uint* t0, char* t1, char* t2)
788790 return 1 ;
789791}
790792
793+ int CutRec_IsRecording ()
794+ {
795+ if (gCutsceneAsReplay == 0 )
796+ return 0 ;
797+
798+ return CurrentGameMode != GAMEMODE_REPLAY ;
799+ }
800+
801+ int CutRec_IsPlaying ()
802+ {
803+ if (gCutsceneAsReplay == 0 )
804+ return 0 ;
805+
806+ return CurrentGameMode == GAMEMODE_REPLAY ;
807+ }
808+
791809#endif // CUTSCENE_RECORDER
0 commit comments