History

Fix wrong status when removing script

Atlante45 committed 9 years ago

Commit 9cacde21 parent 4ec5d701 file · +5 −3Browse 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+5−3
@@ -286,9 +286,11 @@ void EntityScriptServer::checkAndCallPreload(const EntityItemID& entityID, const · 285 unmodified lines
286286 bool notRunning = !_entitiesScriptEngine->getEntityScriptDetails(entityID, details);
287287 if (entity && (reload || notRunning || details.scriptText != entity->getServerScripts())) {
288288 QString scriptUrl = entity->getServerScripts();
289− scriptUrl = ResourceManager::normalizeURL(scriptUrl);
290− qDebug() << "Loading entity server script" << scriptUrl << "for" << entityID;
291− ScriptEngine::loadEntityScript(_entitiesScriptEngine, entityID, scriptUrl, reload);
289+ if (!scriptUrl.isEmpty()) {
290+ scriptUrl = ResourceManager::normalizeURL(scriptUrl);
291+ qDebug() << "Loading entity server script" << scriptUrl << "for" << entityID;
292+ ScriptEngine::loadEntityScript(_entitiesScriptEngine, entityID, scriptUrl, reload);
293+ }
292294 }
293295 }
294296 }