Added command to save current delta time when recording starts.

This commit is contained in:
GPayne
2019-08-30 16:57:48 -06:00
parent c03f98717a
commit 40526b11a2
+7
View File
@@ -168,8 +168,15 @@ bool SessionRecording::startRecording(const std::string& filename) {
}
_recordFile << '\n';
//Record the current delta time so this is preserved in recording
double currentDeltaTime = global::timeManager.deltaTime();
std::string scriptCommandForInitializingDeltaTime = "openspace.time.setDeltaTime(";
scriptCommandForInitializingDeltaTime << currentDeltaTime << ");";
saveScriptKeyframe(scriptCommandForInitializingDeltaTime);
LINFO("Session recording started");
_timestampRecordStarted = global::windowDelegate.applicationTime();
return true;
}