removed redundant calc of isFullScene

This commit is contained in:
ZappoMan 2014-03-12 01:29:41 -07:00
parent 7ce741762e
commit 7e6beba4d2

View file

@ -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,