fix isFullScene correctly

This commit is contained in:
ZappoMan 2014-03-12 10:19:21 -07:00
parent 86feabee99
commit 6173a4d2a7

View file

@ -241,7 +241,9 @@ int OctreeSendThread::packetDistributor(const SharedNodePointer& node, OctreeQue
int truePacketsSent = 0; int truePacketsSent = 0;
int trueBytesSent = 0; int trueBytesSent = 0;
int packetsSentThisInterval = 0; int packetsSentThisInterval = 0;
bool isFullScene = false; bool isFullScene = ((!viewFrustumChanged || !nodeData->getWantDelta()) && nodeData->getViewFrustumJustStoppedChanging())
|| nodeData->hasLodChanged();
bool somethingToSend = true; // assume we have something bool somethingToSend = true; // assume we have something
// FOR NOW... node tells us if it wants to receive only view frustum deltas // FOR NOW... node tells us if it wants to receive only view frustum deltas
@ -366,10 +368,6 @@ int OctreeSendThread::packetDistributor(const SharedNodePointer& node, OctreeQue
<< " Wasted:" << _totalWastedBytes; << " Wasted:" << _totalWastedBytes;
} }
// start tracking our stats
isFullScene = ((!viewFrustumChanged || !nodeData->getWantDelta()) && nodeData->getViewFrustumJustStoppedChanging())
|| nodeData->hasLodChanged();
// If we're starting a full scene, then definitely we want to empty the nodeBag // If we're starting a full scene, then definitely we want to empty the nodeBag
if (isFullScene) { if (isFullScene) {
nodeData->nodeBag.deleteAll(); nodeData->nodeBag.deleteAll();
@ -383,6 +381,7 @@ int OctreeSendThread::packetDistributor(const SharedNodePointer& node, OctreeQue
} }
::startSceneSleepTime = _usleepTime; ::startSceneSleepTime = _usleepTime;
// start tracking our stats
nodeData->stats.sceneStarted(isFullScene, viewFrustumChanged, _myServer->getOctree()->getRoot(), _myServer->getJurisdiction()); nodeData->stats.sceneStarted(isFullScene, viewFrustumChanged, _myServer->getOctree()->getRoot(), _myServer->getJurisdiction());
// This is the start of "resending" the scene. // This is the start of "resending" the scene.