Unload all scripts on entity server loss

This commit is contained in:
Atlante45 2017-01-18 17:45:14 -08:00
parent cbc69fbf9e
commit 6b0b19d36d

View file

@ -253,7 +253,10 @@ void EntityScriptServer::checkAndCallPreload(const EntityItemID& entityID, const
}
void EntityScriptServer::nodeKilled(SharedNodePointer killedNode) {
if (killedNode->getType() == NodeType::EntityServer) {
_entitiesScriptEngine->unloadAllEntityScripts();
resetEntitiesScriptEngine();
}
}
void EntityScriptServer::sendStatsPacket() {