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
243243 void EntityScriptServer::checkAndCallPreload(const EntityItemID& entityID, const bool reload) {
244244 if (_entityViewer.getTree() && !_shuttingDown) {
245245 EntityItemPointer entity = _entityViewer.getTree()->findEntityByEntityItemID(entityID);
246− if (entity && entity->shouldPreloadScript() && _entitiesScriptEngine) {
246+ if (entity && entity->shouldPreloadServerScript() && _entitiesScriptEngine) {
247247 QString scriptUrl = entity->getServerScripts();
248248 scriptUrl = ResourceManager::normalizeURL(scriptUrl);
249249 ScriptEngine::loadEntityScript(_entitiesScriptEngine, entityID, scriptUrl, reload);
250− entity->scriptHasPreloaded();
250+ entity->serverScriptHasPreloaded();
251251 }
252252 }
253253 }