From 7e6beba4d2ff40759df35f5eebdd1dea7dac49a1 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Wed, 12 Mar 2014 01:29:41 -0700 Subject: [PATCH] removed redundant calc of isFullScene --- .../src/octree/OctreeSendThread.cpp | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/assignment-client/src/octree/OctreeSendThread.cpp b/assignment-client/src/octree/OctreeSendThread.cpp index 7a46fa3722..dcef7d59af 100644 --- a/assignment-client/src/octree/OctreeSendThread.cpp +++ b/assignment-client/src/octree/OctreeSendThread.cpp @@ -241,6 +241,7 @@ int OctreeSendThread::packetDistributor(const SharedNodePointer& node, OctreeQue int truePacketsSent = 0; int trueBytesSent = 0; int packetsSentThisInterval = 0; + bool isFullScene = false; bool somethingToSend = true; // assume we have something // FOR NOW... node tells us if it wants to receive only view frustum deltas @@ -366,20 +367,8 @@ int OctreeSendThread::packetDistributor(const SharedNodePointer& node, OctreeQue } // start tracking our stats - qDebug() << "----"; - qDebug() << "viewFrustumChanged=" << viewFrustumChanged; - qDebug() << "nodeData->getWantDelta()=" << nodeData->getWantDelta(); - qDebug() << "nodeData->getViewFrustumJustStoppedChanging()=" << nodeData->getViewFrustumJustStoppedChanging(); - qDebug() << "nodeData->hasLodChanged()=" << nodeData->hasLodChanged(); - - - bool isFullScene = ( - (!viewFrustumChanged || !nodeData->getWantDelta()) - && nodeData->getViewFrustumJustStoppedChanging() - ) - || nodeData->hasLodChanged(); - - qDebug() << "isFullScene=" << isFullScene; + isFullScene = ((!viewFrustumChanged || !nodeData->getWantDelta()) && nodeData->getViewFrustumJustStoppedChanging()) + || nodeData->hasLodChanged(); // If we're starting a full scene, then definitely we want to empty the nodeBag if (isFullScene) { @@ -444,12 +433,6 @@ int OctreeSendThread::packetDistributor(const SharedNodePointer& node, OctreeQue int boundaryLevelAdjust = boundaryLevelAdjustClient + (viewFrustumChanged && nodeData->getWantLowResMoving() ? LOW_RES_MOVING_ADJUST : NO_BOUNDARY_ADJUST); - - bool isFullScene = ((!viewFrustumChanged || !nodeData->getWantDelta()) && - nodeData->getViewFrustumJustStoppedChanging()) || nodeData->hasLodChanged(); - - qDebug() << "SECOND CALC.... isFullScene=" << isFullScene; - EncodeBitstreamParams params(INT_MAX, &nodeData->getCurrentViewFrustum(), wantColor, WANT_EXISTS_BITS, DONT_CHOP, wantDelta, lastViewFrustum, wantOcclusionCulling, coverageMap, boundaryLevelAdjust, voxelSizeScale,