mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-15 08:21:23 -06:00
Publish event when a scheduled script is executed (closes #1892)
This commit is contained in:
@@ -998,11 +998,19 @@ void OpenSpaceEngine::preSynchronization() {
|
||||
global::timeManager->time().j2000Seconds()
|
||||
);
|
||||
for (const std::string& script : schedScripts) {
|
||||
if (script.empty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
global::scriptEngine->queueScript(
|
||||
script,
|
||||
scripting::ScriptEngine::ShouldBeSynchronized::Yes,
|
||||
scripting::ScriptEngine::ShouldSendToRemote::Yes
|
||||
);
|
||||
|
||||
global::eventEngine->publishEvent<events::EventScheduledScriptExecuted>(
|
||||
script
|
||||
);
|
||||
}
|
||||
|
||||
global::renderEngine->updateScene();
|
||||
|
||||
Reference in New Issue
Block a user