History

EntityScriptServer tracks server scripts

Atlante45 committed 9 years ago

Commit 20b7bb01 parent 97e9bff6 files · +19 −4Browse files

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

Unified · Split

assignment-client/src/scripts/EntityScriptServer.cpp+3−3
@@ -97,7 +97,7 @@ void EntityScriptServer::run() { · 96 unmodified lines
9797 auto tree = _entityViewer.getTree().get();
9898 connect(tree, &EntityTree::deletingEntity, this, &EntityScriptServer::deletingEntity, Qt::QueuedConnection);
9999 connect(tree, &EntityTree::addingEntity, this, &EntityScriptServer::addingEntity, Qt::QueuedConnection);
100− connect(tree, &EntityTree::entityScriptChanging, this, &EntityScriptServer::entityScriptChanging, Qt::QueuedConnection);
100+ connect(tree, &EntityTree::entityServerScriptChanging, this, &EntityScriptServer::entityServerScriptChanging, Qt::QueuedConnection);
101101 }
102102
103103 void EntityScriptServer::nodeActivated(SharedNodePointer activatedNode) {
@@ -220,7 +220,7 @@ void EntityScriptServer::deletingEntity(const EntityItemID& entityID) { · 116 unmodified lines
220220 }
221221 }
222222
223−void EntityScriptServer::entityScriptChanging(const EntityItemID& entityID, const bool reload) {
223+void EntityScriptServer::entityServerScriptChanging(const EntityItemID& entityID, const bool reload) {
224224 if (_entityViewer.getTree() && !_shuttingDown) {
225225 _entitiesScriptEngine->unloadEntityScript(entityID);
226226 checkAndCallPreload(entityID, reload);
@@ -231,7 +231,7 @@ void EntityScriptServer::checkAndCallPreload(const EntityItemID& entityID, const · 4 unmodified lines
231231 if (_entityViewer.getTree() && !_shuttingDown) {
232232 EntityItemPointer entity = _entityViewer.getTree()->findEntityByEntityItemID(entityID);
233233 if (entity && entity->shouldPreloadScript() && _entitiesScriptEngine) {
234− QString scriptUrl = entity->getScript();
234+ QString scriptUrl = entity->getServerScripts();
235235 scriptUrl = ResourceManager::normalizeURL(scriptUrl);
236236 ScriptEngine::loadEntityScript(_entitiesScriptEngine, entityID, scriptUrl, reload);
237237 entity->scriptHasPreloaded();