From 36c2cceb577a6daeb16024ad967d5e4710484e0f Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Fri, 5 Oct 2018 15:39:51 -0700 Subject: [PATCH] fix for failing to enter domain --- interface/src/Application.cpp | 5 ++++- interface/src/Application.h | 4 ++++ interface/src/octree/SafeLanding.cpp | 4 +++- interface/src/scripting/WindowScriptingInterface.cpp | 4 ---- interface/src/scripting/WindowScriptingInterface.h | 2 -- scripts/system/interstitialPage.js | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 1e158c30be..57ed19c021 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -5617,7 +5617,8 @@ void Application::update(float deltaTime) { // for nearby entities before starting bullet up. quint64 now = usecTimestampNow(); if (isServerlessMode() || _octreeProcessor.isLoadSequenceComplete()) { - if (gpuTextureMemSizeStable()) { + bool enableInterstitial = DependencyManager::get()->getDomainHandler().getInterstitialModeEnabled(); + if (gpuTextureMemSizeStable() || !enableInterstitial) { // we've received a new full-scene octree stats packet, or it's been long enough to try again anyway _lastPhysicsCheckTime = now; _fullSceneCounterAtLastPhysicsCheck = _fullSceneReceivedCounter; @@ -6241,6 +6242,8 @@ int Application::sendNackPackets() { missingSequenceNumbers = sequenceNumberStats.getMissingSet(); }); + _isMissingSequenceNumbers = (missingSequenceNumbers.size() != 0); + // construct nack packet(s) for this node foreach(const OCTREE_PACKET_SEQUENCE& missingNumber, missingSequenceNumbers) { nackPacketList->writePrimitive(missingNumber); diff --git a/interface/src/Application.h b/interface/src/Application.h index 750d9ce987..75260b910f 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -183,6 +183,8 @@ public: // passes, mirror window passes, etc void copyDisplayViewFrustum(ViewFrustum& viewOut) const; + bool isMissingSequenceNumbers() { return _isMissingSequenceNumbers; } + const ConicalViewFrustums& getConicalViews() const override { return _conicalViews; } const OctreePacketProcessor& getOctreePacketProcessor() const { return _octreeProcessor; } @@ -713,6 +715,8 @@ private: bool _fakedMouseEvent { false }; + bool _isMissingSequenceNumbers { false }; + void checkChangeCursor(); mutable QMutex _changeCursorLock { QMutex::Recursive }; Qt::CursorShape _desiredCursor{ Qt::BlankCursor }; diff --git a/interface/src/octree/SafeLanding.cpp b/interface/src/octree/SafeLanding.cpp index ed0ce3c278..02a8441fab 100644 --- a/interface/src/octree/SafeLanding.cpp +++ b/interface/src/octree/SafeLanding.cpp @@ -142,10 +142,12 @@ bool SafeLanding::isSequenceNumbersComplete() { _initialEnd + SEQUENCE_MODULO - _initialStart; auto startIter = _sequenceNumbers.find(_initialStart); auto endIter = _sequenceNumbers.find(_initialEnd - 1); + + bool missingSequenceNumbers = qApp->isMissingSequenceNumbers(); if (sequenceSize == 0 || (startIter != _sequenceNumbers.end() && endIter != _sequenceNumbers.end() - && distance(startIter, endIter) == sequenceSize - 1)) { + && ((distance(startIter, endIter) == sequenceSize - 1) || !missingSequenceNumbers))) { bool enableInterstitial = DependencyManager::get()->getDomainHandler().getInterstitialModeEnabled(); if (!enableInterstitial) { _trackingEntities = false; // Don't track anything else that comes in. diff --git a/interface/src/scripting/WindowScriptingInterface.cpp b/interface/src/scripting/WindowScriptingInterface.cpp index c09bff7b5e..75f17def20 100644 --- a/interface/src/scripting/WindowScriptingInterface.cpp +++ b/interface/src/scripting/WindowScriptingInterface.cpp @@ -399,10 +399,6 @@ void WindowScriptingInterface::showAssetServer(const QString& upload) { QMetaObject::invokeMethod(qApp, "showAssetServerWidget", Qt::QueuedConnection, Q_ARG(QString, upload)); } -void WindowScriptingInterface::setMinimumGPUTextureMemSizeStabilityCount(int stabilityCount) { - QMetaObject::invokeMethod(qApp, " setMinimumGPUTextureMemStabilityCount", Qt::QueuedConnection, Q_ARG(int, stabilityCount)); -} - QString WindowScriptingInterface::checkVersion() { return QCoreApplication::applicationVersion(); } diff --git a/interface/src/scripting/WindowScriptingInterface.h b/interface/src/scripting/WindowScriptingInterface.h index fe0113b770..f6a5a5ef74 100644 --- a/interface/src/scripting/WindowScriptingInterface.h +++ b/interface/src/scripting/WindowScriptingInterface.h @@ -571,8 +571,6 @@ public slots: float domainLoadingProgress(); - void setMinimumGPUTextureMemSizeStabilityCount(int stabilityCount); - private slots: void onWindowGeometryChanged(const QRect& geometry); void onMessageBoxSelected(int button); diff --git a/scripts/system/interstitialPage.js b/scripts/system/interstitialPage.js index 1c2f83bb04..19e603b4ab 100644 --- a/scripts/system/interstitialPage.js +++ b/scripts/system/interstitialPage.js @@ -50,7 +50,7 @@ "Tip: Use the Create app to import models and create custom entities.", "Tip: We're open source! Feel free to contribute to our code on GitHub!", "Tip: What emotes have you used in the Emote app?", - "Tip: Take and share your snapshots with the everyone using the Snap app.", + "Tip: Take and share your snapshots with everyone using the Snap app.", "Tip: Did you know you can show websites in-world by creating a web entity?", "Tip: Find out more information about domains by visiting our website!", "Tip: Did you know you can get cool new apps from the Marketplace?",