mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +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) {
|
||||
if (killedNode->getType() == NodeType::EntityServer) {
|
||||
_entitiesScriptEngine->unloadAllEntityScripts();
|
||||
if (_entitiesScriptEngine) {
|
||||
_entitiesScriptEngine->unloadAllEntityScripts();
|
||||
_entitiesScriptEngine->stop();
|
||||
}
|
||||
|
||||
resetEntitiesScriptEngine();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue