History

missed part of EntityScriptServer oops

Ada committed 6 months ago

Commit 81eb8911 parent 1b12e111 file · +8 −2Browse files

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

Unified · Split

assignment-client/src/scripts/EntityScriptServer.cpp+8−2
@@ -109,9 +109,15 @@ void EntityScriptServer::handleReloadEntityServerScriptPacket(QSharedPointer<Rec · 108 unmodified lines
109 if (senderNode->getCanRez() || senderNode->getCanRezTmp()) {109 if (senderNode->getCanRez() || senderNode->getCanRezTmp()) {
110 auto entityID = QUuid::fromRfc4122(message->read(NUM_BYTES_RFC4122_UUID));110 auto entityID = QUuid::fromRfc4122(message->read(NUM_BYTES_RFC4122_UUID));
111 111
112 if (_entityViewer.getTree() && !_shuttingDown) {112 if (!_entityViewer.getTree() || _shuttingDown) { return; }
113
114 EntityItemPointer entity = _entityViewer.getTree()->findEntityByEntityItemID(entityID);
115
116 if (entity) {
113 qCDebug(entity_script_server) << "Reloading: " << entityID;117 qCDebug(entity_script_server) << "Reloading: " << entityID;
114 checkAndCallPreload(entityID, true);118
119 auto script = entity->getServerScripts();
120 checkAndCallPreload(entityID, script, script);
115 }121 }
116 }122 }
117}123}