mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge pull request #14378 from danteruiz/fix-case-of-infinate-loading
Fixing case of interstitial not finishing loading
This commit is contained in:
commit
6425a474ac
5 changed files with 35 additions and 5 deletions
|
@ -56,7 +56,7 @@ StackView {
|
|||
Qt.callLater(function() {
|
||||
addressBarDialog.keyboardEnabled = HMD.active;
|
||||
addressLine.forceActiveFocus();
|
||||
addressBarDialog.raised = true;
|
||||
addressBarDialog.keyboardRaised = true;
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -371,6 +371,8 @@ static const QString INFO_HELP_PATH = "html/tabletHelp.html";
|
|||
|
||||
static const unsigned int THROTTLED_SIM_FRAMERATE = 15;
|
||||
static const int THROTTLED_SIM_FRAME_PERIOD_MS = MSECS_PER_SECOND / THROTTLED_SIM_FRAMERATE;
|
||||
static const int ENTITY_SERVER_ADDED_TIMEOUT = 5000;
|
||||
static const int ENTITY_SERVER_CONNECTION_TIMEOUT = 5000;
|
||||
|
||||
static const uint32_t INVALID_FRAME = UINT32_MAX;
|
||||
|
||||
|
@ -1229,6 +1231,18 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
getOverlays().deleteOverlay(getTabletScreenID());
|
||||
getOverlays().deleteOverlay(getTabletHomeButtonID());
|
||||
getOverlays().deleteOverlay(getTabletFrameID());
|
||||
_failedToConnectToEntityServer = false;
|
||||
});
|
||||
|
||||
_entityServerConnectionTimer.setSingleShot(true);
|
||||
connect(&_entityServerConnectionTimer, &QTimer::timeout, this, &Application::setFailedToConnectToEntityServer);
|
||||
|
||||
connect(&domainHandler, &DomainHandler::connectedToDomain, this, [this]() {
|
||||
if (!isServerlessMode()) {
|
||||
_entityServerConnectionTimer.setInterval(ENTITY_SERVER_ADDED_TIMEOUT);
|
||||
_entityServerConnectionTimer.start();
|
||||
_failedToConnectToEntityServer = false;
|
||||
}
|
||||
});
|
||||
connect(&domainHandler, &DomainHandler::domainConnectionRefused, this, &Application::domainConnectionRefused);
|
||||
|
||||
|
@ -5732,6 +5746,7 @@ void Application::update(float deltaTime) {
|
|||
quint64 now = usecTimestampNow();
|
||||
if (isServerlessMode() || _octreeProcessor.isLoadSequenceComplete()) {
|
||||
bool enableInterstitial = DependencyManager::get<NodeList>()->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;
|
||||
|
@ -6663,7 +6678,13 @@ void Application::resettingDomain() {
|
|||
}
|
||||
|
||||
void Application::nodeAdded(SharedNodePointer node) const {
|
||||
// nothing to do here
|
||||
if (node->getType() == NodeType::EntityServer) {
|
||||
if (!_failedToConnectToEntityServer) {
|
||||
_entityServerConnectionTimer.stop();
|
||||
_entityServerConnectionTimer.setInterval(ENTITY_SERVER_CONNECTION_TIMEOUT);
|
||||
_entityServerConnectionTimer.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Application::nodeActivated(SharedNodePointer node) {
|
||||
|
@ -6691,6 +6712,10 @@ void Application::nodeActivated(SharedNodePointer node) {
|
|||
if (node->getType() == NodeType::EntityServer) {
|
||||
_queryExpiry = SteadyClock::now();
|
||||
_octreeQuery.incrementConnectionID();
|
||||
|
||||
if (!_failedToConnectToEntityServer) {
|
||||
_entityServerConnectionTimer.stop();
|
||||
}
|
||||
}
|
||||
|
||||
if (node->getType() == NodeType::AudioMixer && !isInterstitialMode()) {
|
||||
|
|
|
@ -310,6 +310,7 @@ public:
|
|||
|
||||
bool isServerlessMode() const;
|
||||
bool isInterstitialMode() const { return _interstitialMode; }
|
||||
bool failedToConnectToEntityServer() const { return _failedToConnectToEntityServer; }
|
||||
|
||||
void replaceDomainContent(const QString& url);
|
||||
|
||||
|
@ -467,6 +468,7 @@ private slots:
|
|||
|
||||
void loadSettings();
|
||||
void saveSettings() const;
|
||||
void setFailedToConnectToEntityServer() { _failedToConnectToEntityServer = true; }
|
||||
|
||||
bool acceptSnapshot(const QString& urlString);
|
||||
bool askToSetAvatarUrl(const QString& url);
|
||||
|
@ -719,6 +721,7 @@ private:
|
|||
bool _isForeground = true; // starts out assumed to be in foreground
|
||||
bool _isGLInitialized { false };
|
||||
bool _physicsEnabled { false };
|
||||
bool _failedToConnectToEntityServer { false };
|
||||
|
||||
bool _reticleClickPressed { false };
|
||||
|
||||
|
@ -765,6 +768,7 @@ private:
|
|||
QStringList _addAssetToWorldInfoMessages; // Info message
|
||||
QTimer _addAssetToWorldInfoTimer;
|
||||
QTimer _addAssetToWorldErrorTimer;
|
||||
mutable QTimer _entityServerConnectionTimer;
|
||||
|
||||
FileScriptingInterface* _fileDownload;
|
||||
AudioInjectorPointer _snapshotSoundInjector;
|
||||
|
|
|
@ -107,7 +107,7 @@ void SafeLanding::noteReceivedsequenceNumber(int sequenceNumber) {
|
|||
}
|
||||
|
||||
bool SafeLanding::isLoadSequenceComplete() {
|
||||
if (isEntityLoadingComplete() && isSequenceNumbersComplete()) {
|
||||
if ((isEntityLoadingComplete() && isSequenceNumbersComplete()) || qApp->failedToConnectToEntityServer()) {
|
||||
Locker lock(_lock);
|
||||
_initialStart = INVALID_SEQUENCE;
|
||||
_initialEnd = INVALID_SEQUENCE;
|
||||
|
|
|
@ -197,7 +197,7 @@
|
|||
|
||||
var loadingBarProgress = Overlays.addOverlay("image3d", {
|
||||
name: "Loading-Bar-Progress",
|
||||
localPosition: { x: 0.0, y: -0.86, z: 0.0 },
|
||||
localPosition: { x: 0.0, y: -0.91, z: 0.0 },
|
||||
url: LOADING_BAR_PROGRESS,
|
||||
alpha: 1,
|
||||
dimensions: { x: TOTAL_LOADING_PROGRESS, y: 0.3},
|
||||
|
@ -274,6 +274,7 @@
|
|||
previousCameraMode = Camera.mode;
|
||||
Camera.mode = "first person";
|
||||
updateProgressBar(0.0);
|
||||
scaleInterstitialPage(MyAvatar.sensorToWorldScale);
|
||||
timer = Script.setTimeout(update, 2000);
|
||||
}
|
||||
}
|
||||
|
@ -482,7 +483,7 @@
|
|||
var end = 0;
|
||||
var xLocalPosition = (progressPercentage * (end - start)) + start;
|
||||
var properties = {
|
||||
localPosition: { x: xLocalPosition, y: -0.93, z: 0.0 },
|
||||
localPosition: { x: xLocalPosition, y: (HMD.active ? -0.93 : -0.91), z: 0.0 },
|
||||
dimensions: {
|
||||
x: progress,
|
||||
y: 0.3
|
||||
|
|
Loading…
Reference in a new issue