From e4ca6c6303e6318c36801ad4738b38e1af1b2448 Mon Sep 17 00:00:00 2001 From: amantley Date: Thu, 21 Jun 2018 11:22:26 -0700 Subject: [PATCH 1/7] added the fixes for the lurch that happens when driving or flying --- interface/src/avatar/MyAvatar.cpp | 2 +- interface/src/avatar/MySkeletonModel.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index d57905ee33..ae78b5577d 100755 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -3318,7 +3318,7 @@ void MyAvatar::FollowHelper::prePhysicsUpdate(MyAvatar& myAvatar, const glm::mat if (!isActive(Rotation) && (shouldActivateRotation(myAvatar, desiredBodyMatrix, currentBodyMatrix) || hasDriveInput)) { activate(Rotation); } - if (!isActive(Horizontal) && shouldActivateHorizontal(myAvatar, desiredBodyMatrix, currentBodyMatrix)) { + if (!isActive(Horizontal) && (shouldActivateHorizontal(myAvatar, desiredBodyMatrix, currentBodyMatrix) || hasDriveInput)) { activate(Horizontal); } if (!isActive(Vertical) && (shouldActivateVertical(myAvatar, desiredBodyMatrix, currentBodyMatrix) || hasDriveInput)) { diff --git a/interface/src/avatar/MySkeletonModel.cpp b/interface/src/avatar/MySkeletonModel.cpp index c15b00ca19..7cc9079d76 100644 --- a/interface/src/avatar/MySkeletonModel.cpp +++ b/interface/src/avatar/MySkeletonModel.cpp @@ -46,7 +46,7 @@ static AnimPose computeHipsInSensorFrame(MyAvatar* myAvatar, bool isFlying) { } glm::mat4 hipsMat; - if (myAvatar->getCenterOfGravityModelEnabled()) { + if (myAvatar->getCenterOfGravityModelEnabled() && !isFlying) { // then we use center of gravity model hipsMat = myAvatar->deriveBodyUsingCgModel(); } else { From abda0b2381e2f31802d214a1d075a45d693196bc Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 29 Jun 2018 18:25:06 -0700 Subject: [PATCH 2/7] Use case-insensitive matching on friends lists in DomainGatekeeper --- domain-server/src/DomainGatekeeper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/domain-server/src/DomainGatekeeper.cpp b/domain-server/src/DomainGatekeeper.cpp index 2a6b78744e..f28989b029 100644 --- a/domain-server/src/DomainGatekeeper.cpp +++ b/domain-server/src/DomainGatekeeper.cpp @@ -207,7 +207,7 @@ NodePermissions DomainGatekeeper::setPermissionsForUser(bool isLocalUser, QStrin #endif // if this user is a friend of the domain-owner, give them friend's permissions - if (_domainOwnerFriends.contains(verifiedUsername)) { + if (_domainOwnerFriends.contains(verifiedUsername.toLower())) { userPerms |= _server->_settingsManager.getStandardPermissionsForName(NodePermissions::standardNameFriends); #ifdef WANT_DEBUG qDebug() << "| user-permissions: user is friends with domain-owner, so:" << userPerms; @@ -993,7 +993,7 @@ void DomainGatekeeper::getDomainOwnerFriendsListJSONCallback(QNetworkReply* requ _domainOwnerFriends.clear(); QJsonArray friends = jsonObject["data"].toObject()["friends"].toArray(); for (int i = 0; i < friends.size(); i++) { - _domainOwnerFriends += friends.at(i).toString(); + _domainOwnerFriends += friends.at(i).toString().toLower(); } } else { qDebug() << "getDomainOwnerFriendsList api call returned:" << QJsonDocument(jsonObject).toJson(QJsonDocument::Compact); From 773efe8cf0435c80d6be06fbc33525b33d4a20d9 Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Mon, 2 Jul 2018 13:32:25 -0700 Subject: [PATCH 3/7] fix blurry tablet if overlay is drawing --- libraries/render-utils/src/RenderCommonTask.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/render-utils/src/RenderCommonTask.cpp b/libraries/render-utils/src/RenderCommonTask.cpp index 63d07af1c2..24715f0afb 100644 --- a/libraries/render-utils/src/RenderCommonTask.cpp +++ b/libraries/render-utils/src/RenderCommonTask.cpp @@ -60,7 +60,7 @@ void DrawOverlay3D::run(const RenderContextPointer& renderContext, const Inputs& if (_opaquePass) { gpu::doInBatch("DrawOverlay3D::run::clear", args->_context, [&](gpu::Batch& batch){ batch.enableStereo(false); - batch.clearFramebuffer(gpu::Framebuffer::BUFFER_DEPTHSTENCIL, glm::vec4(), 1.f, 0, false); + batch.clearFramebuffer(gpu::Framebuffer::BUFFER_DEPTH, glm::vec4(), 1.f, 0, false); }); } From 91e8f1f0f88123e78e09d691e0dca3773bd9f4a8 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Mon, 2 Jul 2018 15:30:58 -0700 Subject: [PATCH 4/7] Ensure 'verifiedUsername' is always lower case --- domain-server/src/DomainGatekeeper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/domain-server/src/DomainGatekeeper.cpp b/domain-server/src/DomainGatekeeper.cpp index f28989b029..59cc8d10f6 100644 --- a/domain-server/src/DomainGatekeeper.cpp +++ b/domain-server/src/DomainGatekeeper.cpp @@ -207,7 +207,7 @@ NodePermissions DomainGatekeeper::setPermissionsForUser(bool isLocalUser, QStrin #endif // if this user is a friend of the domain-owner, give them friend's permissions - if (_domainOwnerFriends.contains(verifiedUsername.toLower())) { + if (_domainOwnerFriends.contains(verifiedUsername)) { userPerms |= _server->_settingsManager.getStandardPermissionsForName(NodePermissions::standardNameFriends); #ifdef WANT_DEBUG qDebug() << "| user-permissions: user is friends with domain-owner, so:" << userPerms; @@ -412,7 +412,7 @@ SharedNodePointer DomainGatekeeper::processAgentConnectRequest(const NodeConnect } else if (verifyUserSignature(username, usernameSignature, nodeConnection.senderSockAddr)) { // they sent us a username and the signature verifies it getGroupMemberships(username); - verifiedUsername = username; + verifiedUsername = username.toLower(); } else { // they sent us a username, but it didn't check out requestUserPublicKey(username); From aefa52b4c9a1689e99fc1dedf97e78f750f8db75 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Mon, 2 Jul 2018 17:00:31 -0700 Subject: [PATCH 5/7] fixing still only snap in snap app --- scripts/system/html/js/SnapshotReview.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/system/html/js/SnapshotReview.js b/scripts/system/html/js/SnapshotReview.js index 0c3e6199f3..91866605a4 100644 --- a/scripts/system/html/js/SnapshotReview.js +++ b/scripts/system/html/js/SnapshotReview.js @@ -668,6 +668,7 @@ window.onload = function () { addImage(element, messageOptions.isLoggedIn, idx === 0 && messageOptions.canShare, idx === 1, false, false, false, true); }); document.getElementById("p1").classList.add("processingGif"); + document.getElementById("snap-button").disabled = true; } else { var gifPath = message.image_data[0].localPath, p1img = document.getElementById('p1img'); @@ -677,14 +678,15 @@ window.onload = function () { shareForUrl("p1"); appendShareBar("p1", messageOptions.isLoggedIn, messageOptions.canShare, true, false, false, messageOptions.canBlast); document.getElementById("p1").classList.remove("processingGif"); + document.getElementById("snap-button").disabled = false; } } else { imageCount = message.image_data.length; message.image_data.forEach(function (element) { addImage(element, messageOptions.isLoggedIn, messageOptions.canShare, false, false, false, false, true); }); + document.getElementById("snap-button").disabled = false; } - document.getElementById("snap-button").disabled = false; break; case 'captureSettings': handleCaptureSetting(message.setting); @@ -701,7 +703,7 @@ window.onload = function () { case 'snapshotUploadComplete': var isGif = fileExtensionMatches(message.image_url, "gif"); updateShareInfo(isGif ? "p1" : "p0", message.story_id); - if (isPrintProcessing()) { + if (isPrintProcessing()) { setPrintButtonEnabled(); } break; @@ -724,11 +726,11 @@ function snapshotSettings() { })); } function takeSnapshot() { + document.getElementById("snap-button").disabled = true; EventBridge.emitWebEvent(JSON.stringify({ type: "snapshot", action: "takeSnapshot" })); - document.getElementById("snap-button").disabled = true; } function isPrintDisabled() { @@ -739,14 +741,14 @@ function isPrintDisabled() { document.getElementById('print-button').disabled; } function isPrintProcessing() { - var printElement = document.getElementById('print-icon'); + var printElement = document.getElementById('print-icon'); return printElement.classList.contains("print-icon") && printElement.classList.contains("print-icon-loading") && document.getElementById('print-button').disabled; } function isPrintEnabled() { - var printElement = document.getElementById('print-icon'); + var printElement = document.getElementById('print-icon'); return printElement.classList.contains("print-icon") && printElement.classList.contains("print-icon-default") && @@ -773,8 +775,8 @@ function requestPrintButtonUpdate() { })); } -function printToPolaroid() { - if (isPrintEnabled()) { +function printToPolaroid() { + if (isPrintEnabled()) { EventBridge.emitWebEvent(JSON.stringify({ type: "snapshot", action: "printToPolaroid" From 96b26c94eb4779392146e447862d7f21f270f57b Mon Sep 17 00:00:00 2001 From: Sam Gateau Date: Tue, 3 Jul 2018 16:59:40 +0200 Subject: [PATCH 6/7] Really add safe check for targetDisplayPLugin --- interface/src/Application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index fb7d6a4a0f..1f31aaa6ce 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2722,7 +2722,7 @@ void Application::initializeDisplayPlugins() { setDisplayPlugin(defaultDisplayPlugin); // Now set the desired plugin if it's not the same as the default plugin - if (!targetDisplayPlugin && (targetDisplayPlugin != defaultDisplayPlugin)) { + if (targetDisplayPlugin && (targetDisplayPlugin != defaultDisplayPlugin)) { setDisplayPlugin(targetDisplayPlugin); } From 2bbc5b6137cfca2f3314f2d4cbe95342567b98ff Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 3 Jul 2018 09:11:57 -0700 Subject: [PATCH 7/7] remove ray pick print statement - it bloats the debug window --- scripts/system/controllers/handTouch.js | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/system/controllers/handTouch.js b/scripts/system/controllers/handTouch.js index c20b86b775..5e633d4740 100644 --- a/scripts/system/controllers/handTouch.js +++ b/scripts/system/controllers/handTouch.js @@ -605,7 +605,6 @@ var finger = fingerKeys[i]; var LOOKUP_DISTANCE_MULTIPLIER = 1.5; var dist = LOOKUP_DISTANCE_MULTIPLIER*data.distance; - console.log("distance: " + dist); var checkOffset = { x: data.perpendicular.x * dist, y: data.perpendicular.y * dist,