mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-22 18:32:42 +01:00
- cutscene recorder subreplay selection
This commit is contained in:
parent
9c6ff3c594
commit
7af575daec
@ -2569,7 +2569,7 @@ int redriver2_main(int argc, char** argv)
|
||||
{
|
||||
if (argc-i < 3)
|
||||
{
|
||||
printWarning("Example: -recordcutscene <mission_number> <base_mission> <player_id>");
|
||||
printWarning("Example: -recordcutscene <mission_number> <subindex> <base_mission>");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2578,17 +2578,17 @@ int redriver2_main(int argc, char** argv)
|
||||
gInFrontend = 0;
|
||||
AttractMode = 0;
|
||||
|
||||
int player_id = atoi(argv[i+3]);
|
||||
int subindx = atoi(argv[i+2]);
|
||||
|
||||
extern int LoadCutsceneAsReplay(int subindex);
|
||||
extern int gCutsceneAsReplay;
|
||||
extern int gCutsceneAsReplay_PlayerId;
|
||||
|
||||
gCutsceneAsReplay = atoi(argv[i + 1]); // acts as cutscene mission
|
||||
gCurrentMissionNumber = atoi(argv[i + 2]); // acts as base mission. Some mission requires other base
|
||||
gCutsceneAsReplay_PlayerId = atoi(argv[i + 3]);
|
||||
gCurrentMissionNumber = atoi(argv[i + 3]); // acts as base mission. Some mission requires other base
|
||||
gCutsceneAsReplay_PlayerId = 0;
|
||||
|
||||
if (LoadCutsceneAsReplay(0))
|
||||
if (LoadCutsceneAsReplay(subindx))
|
||||
{
|
||||
CurrentGameMode = GAMEMODE_REPLAY;
|
||||
gLoadedReplay = 1;
|
||||
|
@ -190,6 +190,7 @@ int SaveReplayToBuffer(char *buffer)
|
||||
|
||||
// write each stream data
|
||||
#ifdef CUTSCENE_RECORDER
|
||||
extern int gCutsceneAsReplay;
|
||||
int numStreams = gCutsceneAsReplay ? NumReplayStreams : NumPlayers;
|
||||
|
||||
for (int i = 0; i < numStreams; i++)
|
||||
@ -340,7 +341,9 @@ int LoadCutsceneAsReplay(int subindex)
|
||||
|
||||
LoadfileSeg(filename, _other_buffer, offset, size);
|
||||
|
||||
return LoadReplayFromBuffer(_other_buffer);
|
||||
int result = LoadReplayFromBuffer(_other_buffer);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user