Redesign the ScriptScheduler to not copy scripts on return

Fix earth.mod file
This commit is contained in:
Alexander Bock
2016-12-03 00:51:32 +01:00
parent fe436748bf
commit c515bbfd0f
10 changed files with 1182 additions and 162 deletions
+4 -5
View File
@@ -867,11 +867,10 @@ void OpenSpaceEngine::preSynchronization() {
_timeManager->preSynchronization(dt);
auto scheduledScripts = _scriptScheduler->progressTo(Time::ref().j2000Seconds());
while(scheduledScripts.size()){
auto scheduledScript = scheduledScripts.front();
LINFO(scheduledScript);
_scriptEngine->queueScript(scheduledScript, ScriptEngine::RemoteScripting::Yes);
scheduledScripts.pop();
for (auto it = scheduledScripts.first; it != scheduledScripts.second; ++it) {
_scriptEngine->queueScript(
*it, ScriptEngine::RemoteScripting::Yes
);
}
_interactionHandler->updateInputStates(dt);