History

Fix server script preload funcitons

Atlante45 committed 9 years ago

Commit e94cccf1 parent 8dabf252 files · +5 −5Browse files

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

Unified · Split

assignment-client/src/scripts/EntityScriptServer.cpp+2−2
@@ -243,11 +243,11 @@ void EntityScriptServer::entityServerScriptChanging(const EntityItemID& entityID · 242 unmodified lines
243void EntityScriptServer::checkAndCallPreload(const EntityItemID& entityID, const bool reload) {243void EntityScriptServer::checkAndCallPreload(const EntityItemID& entityID, const bool reload) {
244 if (_entityViewer.getTree() && !_shuttingDown) {244 if (_entityViewer.getTree() && !_shuttingDown) {
245 EntityItemPointer entity = _entityViewer.getTree()->findEntityByEntityItemID(entityID);245 EntityItemPointer entity = _entityViewer.getTree()->findEntityByEntityItemID(entityID);
246 if (entity && entity->shouldPreloadScript() && _entitiesScriptEngine) {246 if (entity && entity->shouldPreloadServerScript() && _entitiesScriptEngine) {
247 QString scriptUrl = entity->getServerScripts();247 QString scriptUrl = entity->getServerScripts();
248 scriptUrl = ResourceManager::normalizeURL(scriptUrl);248 scriptUrl = ResourceManager::normalizeURL(scriptUrl);
249 ScriptEngine::loadEntityScript(_entitiesScriptEngine, entityID, scriptUrl, reload);249 ScriptEngine::loadEntityScript(_entitiesScriptEngine, entityID, scriptUrl, reload);
250 entity->scriptHasPreloaded();250 entity->serverScriptHasPreloaded();
251 }251 }
252 }252 }
253}253}