Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 2 files). Show all
Unified · Split
| @@ -243,11 +243,11 @@ void EntityScriptServer::entityServerScriptChanging(const EntityItemID& entityID · 242 unmodified lines | |||
| 243 | void EntityScriptServer::checkAndCallPreload(const EntityItemID& entityID, const bool reload) { | 243 | void 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 | } |