mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-25 20:02:33 +01:00
- fix cutscene-replay saving/loading bugs
This commit is contained in:
parent
96d338bc80
commit
898cf2cef1
@ -3792,7 +3792,7 @@ int PingInCivCar(int minPingInDist)
|
||||
PingOutCivsOnly = 0;
|
||||
|
||||
// [A] REDRIVER2 always stores pings
|
||||
StorePingInfo(cookieCount, newCar->id); // + 1 since car with id 1 is not getting pinged in chases
|
||||
StorePingInfo(cookieCount, newCar->id);
|
||||
|
||||
return newCar->id + 1;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ int gThePlayerCar = -1;
|
||||
|
||||
static int CutsceneStreamIndex = 0;
|
||||
int CutsceneFrameCnt = 0;
|
||||
static int NumCutsceneStreams = 0;
|
||||
int NumCutsceneStreams = 0;
|
||||
static int gHaveInGameCutscene = 0;
|
||||
static int gCSDestroyPlayer = 0;
|
||||
static int PreLoadedCutscene = -1;
|
||||
@ -692,10 +692,11 @@ void ReleaseInGameCutscene(void)
|
||||
replayptr = CutsceneReplayStart;
|
||||
|
||||
NumReplayStreams -= NumCutsceneStreams;
|
||||
NumCutsceneStreams = 0;
|
||||
|
||||
CutsceneReplayStart = NULL;
|
||||
CutsceneStreamIndex = 0;
|
||||
NumCutsceneStreams = 0;
|
||||
|
||||
PreLoadedCutscene = -1;
|
||||
gHaveInGameCutscene = 0;
|
||||
gCSDestroyPlayer = 0;
|
||||
@ -1293,7 +1294,7 @@ int LoadCutsceneToReplayBuffer(int residentCutscene)
|
||||
return 0;
|
||||
}
|
||||
|
||||
CutsceneStreamIndex = NumReplayStreams;
|
||||
CutsceneStreamIndex = NumReplayStreams; //rheader->NumReplayStreams;
|
||||
NumCutsceneStreams = rheader->NumReplayStreams;
|
||||
|
||||
CutsceneReplayStart = replayptr;
|
||||
@ -1329,7 +1330,7 @@ int LoadCutsceneToReplayBuffer(int residentCutscene)
|
||||
pt += size;
|
||||
}
|
||||
|
||||
NumReplayStreams += rheader->NumReplayStreams;
|
||||
NumReplayStreams += NumCutsceneStreams;
|
||||
|
||||
// copy cutscene cameras and pings
|
||||
CutsceneCamera = (PLAYBACKCAMERA *)replayptr;
|
||||
|
@ -13,6 +13,7 @@ extern void InitUserReplays(const char* str);
|
||||
|
||||
extern CUTSCENE_BUFFER CutsceneBuffer;
|
||||
|
||||
extern int NumCutsceneStreams;
|
||||
extern int gSkipInGameCutscene;
|
||||
extern int gInGameCutsceneID;
|
||||
extern int gInGameCutsceneActive;
|
||||
|
@ -116,6 +116,9 @@ void InitPadRecording(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
// reset stream count as cutscene/chase can increase it
|
||||
NumReplayStreams = NumPlayers;
|
||||
|
||||
for (i = 0; i < NumReplayStreams; i++)
|
||||
{
|
||||
ReplayStreams[i].playbackrun = 0;
|
||||
@ -175,9 +178,9 @@ int SaveReplayToBuffer(char *buffer)
|
||||
header->magic = 0x14793209; // TODO: custom
|
||||
header->GameLevel = GameLevel;
|
||||
header->GameType = GameType;
|
||||
header->NumReplayStreams = NumReplayStreams;
|
||||
header->MissionNumber = gCurrentMissionNumber;
|
||||
|
||||
header->NumReplayStreams = NumReplayStreams - NumCutsceneStreams;
|
||||
header->NumPlayers = NumPlayers;
|
||||
header->CutsceneEvent = -1;
|
||||
header->RandomChase = gRandomChase;
|
||||
@ -733,11 +736,10 @@ char GetPingInfo(char *cookieCount)
|
||||
// [A] Stores ping info into replay buffer
|
||||
int StorePingInfo(int cookieCount, int carId)
|
||||
{
|
||||
#ifdef CUTSCENE_RECORDER
|
||||
PING_PACKET* packet;
|
||||
|
||||
#ifdef CUTSCENE_RECORDER
|
||||
|
||||
extern int gCutsceneAsReplay;
|
||||
//extern int gCutsceneAsReplay;
|
||||
if (gCutsceneAsReplay == 0)
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user