History

call script engine shutdown when assignment stopping

Stephen Birarda committed 9 years ago

Commit 88ea6fa1 parent c5140ac2 files · +5 −2Browse files

Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 2 files). Show all

Unified · Split

assignment-client/src/scripts/EntityScriptServer.cpp+3−1
@@ -254,7 +254,7 @@ void EntityScriptServer::clear() { · 253 unmodified lines
254254 _entityViewer.clear();
255255 }
256256
257−void EntityScriptServer::shutdown() {
257+void EntityScriptServer::shutdownScriptEngine() {
258258 if (_entitiesScriptEngine) {
259259 _entitiesScriptEngine->disconnectNonEssentialSignals(); // disconnect all slots/signals from the script engine, except essential
260260 }
@@ -351,6 +351,8 @@ void EntityScriptServer::handleJurisdictionPacket(QSharedPointer<ReceivedMessage · 90 unmodified lines
351351 }
352352
353353 void EntityScriptServer::aboutToFinish() {
354+ shutdownScriptEngine();
355+
354356 // our entity tree is going to go away so tell that to the EntityScriptingInterface
355357 DependencyManager::get<EntityScriptingInterface>()->setEntityTree(nullptr);
356358