From 378b555046396966f1d89e64a75ef721adfa1c90 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Mon, 28 Jul 2014 21:21:54 -0700 Subject: [PATCH] fix entity server name and sending to servers when voxels not enabled --- interface/src/Application.cpp | 19 ++++++++++--------- interface/src/ui/OctreeStatsDialog.cpp | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index b060af6a38..82558e1fea 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2141,9 +2141,16 @@ void Application::updateMyAvatar(float deltaTime) { // if it's been a while since our last query or the view has significantly changed then send a query, otherwise suppress it if (queryIsDue || viewIsDifferentEnough) { _lastQueriedTime = now; - queryOctree(NodeType::VoxelServer, PacketTypeVoxelQuery, _voxelServerJurisdictions); - queryOctree(NodeType::ParticleServer, PacketTypeParticleQuery, _particleServerJurisdictions); - queryOctree(NodeType::EntityServer, PacketTypeEntityQuery, _entityServerJurisdictions); + + if (Menu::getInstance()->isOptionChecked(MenuOption::Voxels)) { + queryOctree(NodeType::VoxelServer, PacketTypeVoxelQuery, _voxelServerJurisdictions); + } + if (Menu::getInstance()->isOptionChecked(MenuOption::Particles)) { + queryOctree(NodeType::ParticleServer, PacketTypeParticleQuery, _particleServerJurisdictions); + } + if (Menu::getInstance()->isOptionChecked(MenuOption::Models)) { + queryOctree(NodeType::EntityServer, PacketTypeEntityQuery, _entityServerJurisdictions); + } _lastQueriedViewFrustum = _viewFrustum; } } @@ -2250,13 +2257,7 @@ int Application::sendNackPackets() { void Application::queryOctree(NodeType_t serverType, PacketType packetType, NodeToJurisdictionMap& jurisdictions) { - // if voxels are disabled, then don't send this at all... - if (!Menu::getInstance()->isOptionChecked(MenuOption::Voxels)) { - return; - } - //qDebug() << ">>> inside... queryOctree()... _viewFrustum.getFieldOfView()=" << _viewFrustum.getFieldOfView(); - bool wantExtraDebugging = getLogger()->extraDebugging(); // These will be the same for all servers, so we can set them up once and then reuse for each server we send to. diff --git a/interface/src/ui/OctreeStatsDialog.cpp b/interface/src/ui/OctreeStatsDialog.cpp index 80c0b25243..76a88a9cf9 100644 --- a/interface/src/ui/OctreeStatsDialog.cpp +++ b/interface/src/ui/OctreeStatsDialog.cpp @@ -232,7 +232,7 @@ void OctreeStatsDialog::showAllOctreeServers() { showOctreeServersOfType(serverCount, NodeType::ParticleServer, "Particle", Application::getInstance()->getParticleServerJurisdictions()); - showOctreeServersOfType(serverCount, NodeType::EntityServer, "Model", + showOctreeServersOfType(serverCount, NodeType::EntityServer, "Entity", Application::getInstance()->getEntityServerJurisdictions()); if (_voxelServerLabelsCount > serverCount) {