Skip to content

Commit f66cd08

Browse files
committed
Moved to EngineDemoRecorder
1 parent 6fb46f2 commit f66cd08

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/Modules/EngineDemoRecorder.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ int EngineDemoRecorder::GetTick() {
3737
return this->GetRecordingTick(this->s_ClientDemoRecorder->ThisPtr());
3838
}
3939

40+
// Stop any running demo so the SAR checksum is written to the demo file
41+
ON_EVENT(SAR_UNLOAD) {
42+
if (engine->demorecorder->isRecordingDemo) {
43+
engine->demorecorder->Stop();
44+
}
45+
}
46+
4047
std::string EngineDemoRecorder::GetDemoFilename() {
4148
#ifdef _WIN32
4249
# define PATH_SEP "\\"

src/SAR.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,7 @@ void SAR::SearchPlugin() {
212212
void SAR::Unload() {
213213
if (unloading) return;
214214
unloading = true;
215-
216-
// Stop any running demo so the SAR checksum is written to the demo file
217-
if (engine->demorecorder->isRecordingDemo) {
218-
engine->demorecorder->Stop();
219-
}
220-
215+
221216
curl_global_cleanup();
222217
if (statsCounter) {
223218
statsCounter->RecordData(session->GetTick());

0 commit comments

Comments
 (0)