diff options
author | withmorten <morten.with@gmail.com> | 2021-01-13 00:28:07 +0100 |
---|---|---|
committer | withmorten <morten.with@gmail.com> | 2021-01-13 00:28:07 +0100 |
commit | 61036779140610c81688a636c3226c46571dbbef (patch) | |
tree | 1656364b5d81357883639fc1acd30668cc679f8b /src/control/Replay.cpp | |
parent | Merge pull request #954 from withmorten/master (diff) | |
download | re3-61036779140610c81688a636c3226c46571dbbef.tar re3-61036779140610c81688a636c3226c46571dbbef.tar.gz re3-61036779140610c81688a636c3226c46571dbbef.tar.bz2 re3-61036779140610c81688a636c3226c46571dbbef.tar.lz re3-61036779140610c81688a636c3226c46571dbbef.tar.xz re3-61036779140610c81688a636c3226c46571dbbef.tar.zst re3-61036779140610c81688a636c3226c46571dbbef.zip |
Diffstat (limited to 'src/control/Replay.cpp')
-rw-r--r-- | src/control/Replay.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp index 05880162..2e87d1a7 100644 --- a/src/control/Replay.cpp +++ b/src/control/Replay.cpp @@ -1457,7 +1457,7 @@ void CReplay::SaveReplayToHD(void) CFileMgr::SetDir(""); } -void PlayReplayFromHD(void) +void CReplay::PlayReplayFromHD(void) { CFileMgr::SetDirMyDocuments(); int fr = CFileMgr::OpenFile("replay.rep", "rb"); @@ -1476,17 +1476,17 @@ void PlayReplayFromHD(void) return; } int slot; - for (slot = 0; CFileMgr::Read(fr, (char*)CReplay::Buffers[slot], sizeof(CReplay::Buffers[slot])); slot++) - CReplay::BufferStatus[slot] = CReplay::REPLAYBUFFER_PLAYBACK; - CReplay::BufferStatus[slot - 1] = CReplay::REPLAYBUFFER_RECORD; - while (slot < CReplay::NUM_REPLAYBUFFERS) - CReplay::BufferStatus[slot++] = CReplay::REPLAYBUFFER_UNUSED; + for (slot = 0; CFileMgr::Read(fr, (char*)Buffers[slot], sizeof(Buffers[slot])); slot++) + BufferStatus[slot] = REPLAYBUFFER_PLAYBACK; + BufferStatus[slot - 1] = REPLAYBUFFER_RECORD; + while (slot < NUM_REPLAYBUFFERS) + BufferStatus[slot++] = REPLAYBUFFER_UNUSED; CFileMgr::CloseFile(fr); CFileMgr::SetDir(""); - CReplay::TriggerPlayback(CReplay::REPLAYCAMMODE_ASSTORED, 0.0f, 0.0f, 0.0f, false); - CReplay::bPlayingBackFromFile = true; - CReplay::bAllowLookAroundCam = true; - CReplay::StreamAllNecessaryCarsAndPeds(); + TriggerPlayback(REPLAYCAMMODE_ASSTORED, 0.0f, 0.0f, 0.0f, false); + bPlayingBackFromFile = true; + bAllowLookAroundCam = true; + StreamAllNecessaryCarsAndPeds(); } void CReplay::StreamAllNecessaryCarsAndPeds(void) |