mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 09:57:26 +02:00
call script engine shutdown when assignment stopping
This commit is contained in:
parent
c5140ac695
commit
88ea6fa589
2 changed files with 5 additions and 2 deletions
|
@ -254,7 +254,7 @@ void EntityScriptServer::clear() {
|
||||||
_entityViewer.clear();
|
_entityViewer.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityScriptServer::shutdown() {
|
void EntityScriptServer::shutdownScriptEngine() {
|
||||||
if (_entitiesScriptEngine) {
|
if (_entitiesScriptEngine) {
|
||||||
_entitiesScriptEngine->disconnectNonEssentialSignals(); // disconnect all slots/signals from the script engine, except essential
|
_entitiesScriptEngine->disconnectNonEssentialSignals(); // disconnect all slots/signals from the script engine, except essential
|
||||||
}
|
}
|
||||||
|
@ -351,6 +351,8 @@ void EntityScriptServer::handleJurisdictionPacket(QSharedPointer<ReceivedMessage
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityScriptServer::aboutToFinish() {
|
void EntityScriptServer::aboutToFinish() {
|
||||||
|
shutdownScriptEngine();
|
||||||
|
|
||||||
// our entity tree is going to go away so tell that to the EntityScriptingInterface
|
// our entity tree is going to go away so tell that to the EntityScriptingInterface
|
||||||
DependencyManager::get<EntityScriptingInterface>()->setEntityTree(nullptr);
|
DependencyManager::get<EntityScriptingInterface>()->setEntityTree(nullptr);
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,8 @@ private:
|
||||||
|
|
||||||
void resetEntitiesScriptEngine();
|
void resetEntitiesScriptEngine();
|
||||||
void clear();
|
void clear();
|
||||||
void shutdown();
|
void shutdownScriptEngine();
|
||||||
|
|
||||||
void addingEntity(const EntityItemID& entityID);
|
void addingEntity(const EntityItemID& entityID);
|
||||||
void deletingEntity(const EntityItemID& entityID);
|
void deletingEntity(const EntityItemID& entityID);
|
||||||
void entityServerScriptChanging(const EntityItemID& entityID, const bool reload);
|
void entityServerScriptChanging(const EntityItemID& entityID, const bool reload);
|
||||||
|
|
Loading…
Reference in a new issue