History

Unload all scripts on entity server loss

Atlante45 committed 9 years ago

Commit 6b0b19d1 parent cbc69fb1 file · +4 −1Browse files

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

Unified · Split

assignment-client/src/scripts/EntityScriptServer.cpp+4−1
@@ -253,7 +253,10 @@ void EntityScriptServer::checkAndCallPreload(const EntityItemID& entityID, const · 252 unmodified lines
253253 }
254254
255255 void EntityScriptServer::nodeKilled(SharedNodePointer killedNode) {
256−
256+ if (killedNode->getType() == NodeType::EntityServer) {
257+ _entitiesScriptEngine->unloadAllEntityScripts();
258+ resetEntitiesScriptEngine();
259+ }
257260 }
258261
259262 void EntityScriptServer::sendStatsPacket() {