Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 6 files). Show all
Unified · Split
| @@ -97,7 +97,7 @@ void EntityScriptServer::run() { · 96 unmodified lines | ||
| 97 | 97 | auto tree = _entityViewer.getTree().get(); |
| 98 | 98 | connect(tree, &EntityTree::deletingEntity, this, &EntityScriptServer::deletingEntity, Qt::QueuedConnection); |
| 99 | 99 | 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); | |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | void EntityScriptServer::nodeActivated(SharedNodePointer activatedNode) { |
| @@ -220,7 +220,7 @@ void EntityScriptServer::deletingEntity(const EntityItemID& entityID) { · 116 unmodified lines | ||
| 220 | 220 | } |
| 221 | 221 | } |
| 222 | 222 | |
| 223 | −void EntityScriptServer::entityScriptChanging(const EntityItemID& entityID, const bool reload) { | |
| 223 | +void EntityScriptServer::entityServerScriptChanging(const EntityItemID& entityID, const bool reload) { | |
| 224 | 224 | if (_entityViewer.getTree() && !_shuttingDown) { |
| 225 | 225 | _entitiesScriptEngine->unloadEntityScript(entityID); |
| 226 | 226 | checkAndCallPreload(entityID, reload); |
| @@ -231,7 +231,7 @@ void EntityScriptServer::checkAndCallPreload(const EntityItemID& entityID, const · 4 unmodified lines | ||
| 231 | 231 | if (_entityViewer.getTree() && !_shuttingDown) { |
| 232 | 232 | EntityItemPointer entity = _entityViewer.getTree()->findEntityByEntityItemID(entityID); |
| 233 | 233 | if (entity && entity->shouldPreloadScript() && _entitiesScriptEngine) { |
| 234 | − QString scriptUrl = entity->getScript(); | |
| 234 | + QString scriptUrl = entity->getServerScripts(); | |
| 235 | 235 | scriptUrl = ResourceManager::normalizeURL(scriptUrl); |
| 236 | 236 | ScriptEngine::loadEntityScript(_entitiesScriptEngine, entityID, scriptUrl, reload); |
| 237 | 237 | entity->scriptHasPreloaded(); |