mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
stop script engine when entity server goes away
This commit is contained in:
parent
6c21339485
commit
b00435074e
1 changed files with 5 additions and 1 deletions
|
@ -297,7 +297,11 @@ void EntityScriptServer::checkAndCallPreload(const EntityItemID& entityID, const
|
||||||
|
|
||||||
void EntityScriptServer::nodeKilled(SharedNodePointer killedNode) {
|
void EntityScriptServer::nodeKilled(SharedNodePointer killedNode) {
|
||||||
if (killedNode->getType() == NodeType::EntityServer) {
|
if (killedNode->getType() == NodeType::EntityServer) {
|
||||||
_entitiesScriptEngine->unloadAllEntityScripts();
|
if (_entitiesScriptEngine) {
|
||||||
|
_entitiesScriptEngine->unloadAllEntityScripts();
|
||||||
|
_entitiesScriptEngine->stop();
|
||||||
|
}
|
||||||
|
|
||||||
resetEntitiesScriptEngine();
|
resetEntitiesScriptEngine();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue