diff options
Diffstat (limited to 'indra/newview')
22 files changed, 885 insertions, 153 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 5274986ff0..1315baf740 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1668,7 +1668,7 @@ set(viewer_APPSETTINGS_FILES app_settings/toolbars.xml app_settings/trees.xml app_settings/viewerart.xml - ${CMAKE_SOURCE_DIR}/../etc/message.xml + app_settings/message.xml ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg packages-info.txt featuretable.txt @@ -1762,7 +1762,7 @@ if (WINDOWS) set(COPY_INPUT_DEPENDENCIES # The following commented dependencies are determined at variably at build time. Can't do this here. - ${CMAKE_SOURCE_DIR}/../etc/message.xml + app_settings/message.xml ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg ${SHARED_LIB_STAGING_DIR}/openjp2.dll ${SHARED_LIB_STAGING_DIR}/llwebrtc.dll diff --git a/indra/newview/app_settings/message.xml b/indra/newview/app_settings/message.xml new file mode 100755 index 0000000000..dee3fd72dd --- /dev/null +++ b/indra/newview/app_settings/message.xml @@ -0,0 +1,751 @@ +<?xml version="1.0"?> +<llsd> + <map> + <key>serverDefaults</key> + <!-- + a map of server names to default message transport + --> + <map> + <key>simulator</key> + <string>template</string> + + <key>spaceserver</key> + <string>template</string> + + <key>dataserver</key> + <string>template</string> + + <key>logDataserver</key> + <string>template</string> + + <key>inventoryDataserver</key> + <string>template</string> + + <key>rpcserver</key> + <string>template</string> + + <key>mapserver</key> + <string>template</string> + + <key>viewer</key> + <string>template</string> + + </map> + <key>messages</key> + <!-- + a map of individual message names that override defaults + --> + <map> + <!-- + Circuit related messages + --> + <key>PacketAck</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>OpenCircuit</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>CloseCircuit</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>StartPingCheck</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>CompletePingCheck</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>AddCircuitCode</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>UseCircuitCode</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>CreateTrustedCircuit</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>RequestTrustedCircuit</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <!-- + Simulator to Launcher + until we get a HTTP server in the launcher + --> + <key>ReportAutosaveCrash</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>SetCPURatio</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <!-- + Viewer to simulator messages sent before UntrustedSimulatorMessage cap received. + --> + <key>CompleteAgentMovement</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>EconomyDataRequest</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ViewerEffect</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>RegionHandshakeReply</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <!-- + Viewer to simulator messages sent unreliably. + --> + <key>AgentUpdate</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <!-- + Messages created by LLThrottleGroup clients + --> + <key>ImagePacket</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>LayerData</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ObjectUpdateCached</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ObjectUpdateCompressed</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ObjectUpdate</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ImprovedTerseObjectUpdate</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>AvatarAnimation</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ObjectAnimation</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>AvatarAppearance</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <!-- Simulator to simulator reliable messages --> + <key>GodKickUser</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>RoutedMoneyBalanceReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <!-- Simulator to simulator unreliable messages --> + <key>EdgeDataPacket</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>CoarseLocationUpdate</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>true</boolean> + <key>only-send-latest</key> + <boolean>true</boolean> + </map> + + <key>SimulatorLoad</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>EstablishAgentCommunication</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>AgentGroupDataUpdate</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>AgentDropGroup</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ChatterBoxSessionStartReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ChatterBoxSessionEventReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ForceCloseChatterBoxSession</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ChatterBoxSessionAgentListUpdates</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ChatterBoxSessionUpdate</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ChatterBoxInvitation</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <!-- Client to server --> + <key>ParcelVoiceInfoRequest</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <!-- Server to client --> + <key>DisplayNameUpdate</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ParcelVoiceInfo</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ParcelNavigateMedia</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ParcelObjectOwnersReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ParcelProperties</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>LandStatReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>PlacesReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>SetDisplayNameReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>SimConsoleResponse</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>DirLandReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>avatarnotesrequest</key> + <map> + <key>service_name</key> + <string>avatar-notes</string> + <key>builder</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>avatarclassifiedsrequest</key> + <map> + <key>service_name</key> + <string>avatar-classifieds</string> + <key>builder</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>avatarpicksrequest</key> + <map> + <key>service_name</key> + <string>avatar-pick</string> + <key>builder</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>pickinforequest</key> + <map> + <key>service_name</key> + <string>pick-info</string> + <key>builder</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ProvisionVoiceAccountRequest</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>VoiceSignalingRequest</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + <!-- Server to client --> + <key>RequiredVoiceVersion</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>EnableSimulator</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>TeleportFinish</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>TeleportFailed</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>CrossedRegion</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>NavMeshStatusUpdate</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>AgentStateUpdate</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <!-- UDPDeprecated Messages --> + <key>ScriptRunningReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>LandStatReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>StartGroupProposal</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>FetchInventoryDescendents</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>GroupProposalBallot</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>RpcScriptRequestInboundForward</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ObjectPhysicsProperties</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + </map> + <key>capBans</key> + <map> + <key>MapLayer</key> + <boolean>false</boolean> + + <key>MapLayerGod</key> + <boolean>false</boolean> + + <key>NewFileAgentInventory</key> + <boolean>false</boolean> + + <key>UpdateGestureAgentInventory</key> + <boolean>false</boolean> + + <key>UpdateNotecardAgentInventory</key> + <boolean>false</boolean> + + <key>UpdateScriptAgentInventory</key> + <boolean>false</boolean> + + <key>UpdateGestureTaskInventory</key> + <boolean>false</boolean> + + <key>UpdateNotecardTaskInventory</key> + <boolean>false</boolean> + + <key>UpdateScriptTaskInventory</key> + <boolean>false</boolean> + + <key>ViewerStartAuction</key> + <boolean>true</boolean> + + <key>ParcelGodReserveForNewbie</key> + <boolean>true</boolean> + + <key>SendUserReport</key> + <boolean>false</boolean> + + <key>SendUserReportWithScreenshot</key> + <boolean>false</boolean> + + <key>RequestTextureDownload</key> + <boolean>true</boolean> + + <key>EventQueueGet</key> + <boolean>false</boolean> + + <key>UntrustedSimulatorMessage</key> + <boolean>false</boolean> + + <key>SendPostcard</key> + <boolean>false</boolean> + + <key>SendPostcard2</key> + <boolean>true</boolean> + + <key>SendPostcard3</key> + <boolean>true</boolean> + + <key>ParcelVoiceInfoRequest</key> + <boolean>false</boolean> + + <key>ChatSessionRequest</key> + <boolean>false</boolean> + + <key>ProvisionVoiceAccountRequest</key> + <boolean>false</boolean> + + <key>VoiceSignalingRequest</key> + <boolean>false</boolean> + + <key>RemoteParcelRequest</key> + <boolean>false</boolean> + + <key>SearchStatTracking</key> + <boolean>false</boolean> + + <key>ParcelPropertiesUpdate</key> + <boolean>false</boolean> + + <key>EstateChangeInfo</key> + <boolean>true</boolean> + + <key>FetchInventoryDescendents2</key> + <boolean>false</boolean> + + <key>FetchInventory2</key> + <boolean>false</boolean> + + <key>FetchLibDescendents2</key> + <boolean>false</boolean> + + <key>FetchLib2</key> + <boolean>false</boolean> + + <key>UploadBakedTexture</key> + <boolean>true</boolean> + + <key>ObjectMedia</key> + <boolean>false</boolean> + + <key>ObjectMediaNavigate</key> + <boolean>false</boolean> + + </map> + + <key>messageBans</key> + <map> + <key>trusted</key> + <map> + </map> + + <key>untrusted</key> + <map> + </map> + </map> + + <key>maxQueuedEvents</key> + <integer>100</integer> + </map> +</llsd> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f4158188ad..d64f82d303 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1159,7 +1159,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>ShowDiscordActivityDetails</key> <map> diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp index e24aea4a28..28f30ae1c9 100644 --- a/indra/newview/gltf/asset.cpp +++ b/indra/newview/gltf/asset.cpp @@ -589,7 +589,9 @@ bool Asset::prep() for (U32 variant = 0; variant < LLGLSLShader::NUM_GLTF_VARIANTS; ++variant) { +#ifdef SHOW_ASSERT U32 attribute_mask = 0; +#endif // for each mesh for (auto& mesh : mMeshes) { @@ -607,7 +609,9 @@ bool Asset::prep() // all primitives of a given variant and material should all have the same attribute mask llassert(attribute_mask == 0 || primitive.mAttributeMask == attribute_mask); +#ifdef SHOW_ASSERT attribute_mask |= primitive.mAttributeMask; +#endif } } } diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 339656089c..b2c66b1bac 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -1752,7 +1752,6 @@ F32 LLAgentCamera::calcCameraFOVZoomFactor() LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(bool *hit_limit) { // Compute base camera position and look-at points. - F32 camera_land_height; LLVector3d frame_center_global = !isAgentAvatarValid() ? gAgent.getPositionGlobal() : gAgent.getPosGlobalFromAgent(getAvatarRootPosition()); @@ -1989,10 +1988,11 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(bool *hit_limit) } } - // Don't let camera go underground - F32 camera_min_off_ground = getCameraMinOffGround(); - camera_land_height = LLWorld::getInstance()->resolveLandHeightGlobal(camera_position_global); - F32 minZ = llmax(F_ALMOST_ZERO, camera_land_height + camera_min_off_ground); + // Don't let camera go underground if constrained + // If not constrained, permit going 1000m below 0, use case: retrieving objects + F32 camera_min_off_ground = getCameraMinOffGround(); // checks isDisableCameraConstraints + F32 camera_land_height = LLWorld::getInstance()->resolveLandHeightGlobal(camera_position_global); + F32 minZ = camera_land_height + camera_min_off_ground; if (camera_position_global.mdV[VZ] < minZ) { camera_position_global.mdV[VZ] = minZ; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 66dadf7545..3eb0479341 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5929,100 +5929,21 @@ void LLAppViewer::initDiscordSocial() gDiscordPartyMaxSize = 0; gDiscordTimestampsStart = time(nullptr); gDiscordClient = std::make_shared<discordpp::Client>(); - gDiscordClient->SetStatusChangedCallback([](discordpp::Client::Status status, discordpp::Client::Error, int32_t) { - if (status == discordpp::Client::Status::Ready) - { - updateDiscordActivity(); - } - }); - if (gSavedSettings.getBOOL("EnableDiscord")) - { - auto credential = gSecAPIHandler->loadCredential("Discord"); - if (credential.notNull()) - { - gDiscordClient->UpdateToken(discordpp::AuthorizationTokenType::Bearer, credential->getAuthenticator()["token"].asString(), [](discordpp::ClientResult result) { - if (result.Successful()) - gDiscordClient->Connect(); - else - LL_WARNS("Discord") << result.Error() << LL_ENDL; - }); - } - else - { - LL_WARNS("Discord") << "Integration was enabled, but no credentials. Disabling integration." << LL_ENDL; - gSavedSettings.setBOOL("EnableDiscord", false); - } - } + gDiscordClient->SetApplicationId(1394782217405862001); + updateDiscordActivity(); } -void LLAppViewer::toggleDiscordIntegration(const LLSD& value) +void LLAppViewer::updateDiscordActivity() { - static const uint64_t APPLICATION_ID = 1394782217405862001; - if (value.asBoolean()) - { - discordpp::AuthorizationArgs args{}; - args.SetClientId(APPLICATION_ID); - args.SetScopes(discordpp::Client::GetDefaultPresenceScopes()); - auto codeVerifier = gDiscordClient->CreateAuthorizationCodeVerifier(); - args.SetCodeChallenge(codeVerifier.Challenge()); - gDiscordClient->Authorize(args, [codeVerifier](auto result, auto code, auto redirectUri) { - if (result.Successful()) - { - gDiscordClient->GetToken(APPLICATION_ID, code, codeVerifier.Verifier(), redirectUri, [](discordpp::ClientResult result, std::string accessToken, std::string, discordpp::AuthorizationTokenType, int32_t, std::string) { - if (result.Successful()) - { - gDiscordClient->UpdateToken(discordpp::AuthorizationTokenType::Bearer, accessToken, [accessToken](discordpp::ClientResult result) { - if (result.Successful()) - { - LLSD authenticator = LLSD::emptyMap(); - authenticator["token"] = accessToken; - gSecAPIHandler->saveCredential(gSecAPIHandler->createCredential("Discord", LLSD::emptyMap(), authenticator), true); - gDiscordClient->Connect(); - } - else - { - LL_WARNS("Discord") << result.Error() << LL_ENDL; - } - }); - } - else - { - LL_WARNS("Discord") << result.Error() << LL_ENDL; - } - }); - } - else - { - LL_WARNS("Discord") << result.Error() << LL_ENDL; - gSavedSettings.setBOOL("EnableDiscord", false); - } - }); - } - else + LL_PROFILE_ZONE_SCOPED; + + static LLCachedControl<bool> integration_enabled(gSavedSettings, "EnableDiscord", true); + if (!integration_enabled) { - gDiscordClient->Disconnect(); - auto credential = gSecAPIHandler->loadCredential("Discord"); - if (credential.notNull()) - { - gDiscordClient->RevokeToken(APPLICATION_ID, credential->getAuthenticator()["token"].asString(), [](discordpp::ClientResult result) { - if (result.Successful()) - LL_INFOS("Discord") << "Access token successfully revoked." << LL_ENDL; - else - LL_WARNS("Discord") << "No access token to revoke." << LL_ENDL; - }); - auto cred = new LLCredential("Discord"); - gSecAPIHandler->deleteCredential(cred); - } - else - { - LL_WARNS("Discord") << "Credentials are already nonexistent." << LL_ENDL; - } + gDiscordClient->ClearRichPresence(); + return; } -} -void LLAppViewer::updateDiscordActivity() -{ - LL_PROFILE_ZONE_SCOPED; discordpp::Activity activity; activity.SetType(discordpp::ActivityTypes::Playing); discordpp::ActivityTimestamps timestamps; @@ -6050,37 +5971,39 @@ void LLAppViewer::updateDiscordActivity() activity.SetDetails(gDiscordActivityDetails); } + auto agent_pos_region = gAgent.getPositionAgent(); + S32 pos_x = S32(agent_pos_region.mV[VX] + 0.5f); + S32 pos_y = S32(agent_pos_region.mV[VY] + 0.5f); + S32 pos_z = S32(agent_pos_region.mV[VZ] + 0.5f); + F32 velocity_mag_sq = gAgent.getVelocity().magVecSquared(); + const F32 FLY_CUTOFF = 6.f; + const F32 FLY_CUTOFF_SQ = FLY_CUTOFF * FLY_CUTOFF; + const F32 WALK_CUTOFF = 1.5f; + const F32 WALK_CUTOFF_SQ = WALK_CUTOFF * WALK_CUTOFF; + if (velocity_mag_sq > FLY_CUTOFF_SQ) + { + pos_x -= pos_x % 4; + pos_y -= pos_y % 4; + } + else if (velocity_mag_sq > WALK_CUTOFF_SQ) + { + pos_x -= pos_x % 2; + pos_y -= pos_y % 2; + } + + std::string location = "Hidden Region"; static LLCachedControl<bool> show_state(gSavedSettings, "ShowDiscordActivityState", false); if (show_state) { - auto agent_pos_region = gAgent.getPositionAgent(); - S32 pos_x = S32(agent_pos_region.mV[VX] + 0.5f); - S32 pos_y = S32(agent_pos_region.mV[VY] + 0.5f); - S32 pos_z = S32(agent_pos_region.mV[VZ] + 0.5f); - F32 velocity_mag_sq = gAgent.getVelocity().magVecSquared(); - const F32 FLY_CUTOFF = 6.f; - const F32 FLY_CUTOFF_SQ = FLY_CUTOFF * FLY_CUTOFF; - const F32 WALK_CUTOFF = 1.5f; - const F32 WALK_CUTOFF_SQ = WALK_CUTOFF * WALK_CUTOFF; - if (velocity_mag_sq > FLY_CUTOFF_SQ) - { - pos_x -= pos_x % 4; - pos_y -= pos_y % 4; - } - else if (velocity_mag_sq > WALK_CUTOFF_SQ) - { - pos_x -= pos_x % 2; - pos_y -= pos_y % 2; - } - auto location = llformat("%s (%d, %d, %d)", gAgent.getRegion()->getName().c_str(), pos_x, pos_y, pos_z); - activity.SetState(location); - - discordpp::ActivityParty party; - party.SetId(location); - party.SetCurrentSize(gDiscordPartyCurrentSize); - party.SetMaxSize(gDiscordPartyMaxSize); - activity.SetParty(party); + location = llformat("%s (%d, %d, %d)", gAgent.getRegion()->getName().c_str(), pos_x, pos_y, pos_z); } + activity.SetState(location); + + discordpp::ActivityParty party; + party.SetId(location); + party.SetCurrentSize(gDiscordPartyCurrentSize); + party.SetMaxSize(gDiscordPartyMaxSize); + activity.SetParty(party); gDiscordClient->UpdateRichPresence(activity, [](discordpp::ClientResult) {}); } diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 14e96afe94..132d7bfe25 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -253,7 +253,6 @@ public: #ifdef LL_DISCORD static void initDiscordSocial(); - static void toggleDiscordIntegration(const LLSD& value); static void updateDiscordActivity(); static void updateDiscordPartyCurrentSize(int32_t size); static void updateDiscordPartyMaxSize(int32_t size); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index a966253c2c..1988e2072b 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -189,7 +189,14 @@ public: std::string url = "secondlife://" + mObjectData["slurl"].asString(); LLUrlAction::teleportToLocation(url); } - + else if (level == "obj_zoom_in") + { + LLUUID obj_id = mObjectData["object_id"]; + if (obj_id.notNull()) + { + handle_zoom_to_object(obj_id); + } + } } bool onObjectIconContextMenuItemVisible(const LLSD& userdata) @@ -203,6 +210,15 @@ public: { return !LLMuteList::getInstance()->isMuted(getAvatarId(), mFrom, LLMute::flagTextChat); } + else if (level == "obj_zoom_in") + { + LLUUID obj_id = mObjectData["object_id"]; + if (obj_id.notNull()) + { + return nullptr != gObjectList.findObject(mAvatarID); + } + return false; + } return false; } diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 550dfeb802..5ac4ce0d52 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -37,6 +37,8 @@ #include "lllocalcliprect.h" #include "lltrans.h" #include "llfloaterimnearbychat.h" +#include "llfloaterworldmap.h" +#include "llviewermenu.h" #include "llviewercontrol.h" #include "llagentdata.h" @@ -75,6 +77,23 @@ public: return true; } + if (verb == "zoomin") + { + if (!handle_zoom_to_object(object_id) && params.size() > 2) + { + // zoom faled, show location + // secondlife:///app/object/object_id/zoomin/{LOCATION}/{COORDS} SLapp + const std::string region_name = LLURI::unescape(params[0].asString()); + S32 x = (params.size() > 1) ? params[1].asInteger() : 128; + S32 y = (params.size() > 2) ? params[2].asInteger() : 128; + S32 z = (params.size() > 3) ? params[3].asInteger() : 0; + + LLFloaterWorldMap::getInstance()->trackURL(region_name, x, y, z); + LLFloaterReg::showInstance("world_map", "center"); + } + return true; + } + return false; } }; diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 7d58511d41..cdf3244389 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -143,7 +143,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass) gGL.setColorMask(true, true); LLColor3 light_diffuse(0, 0, 0); - F32 light_exp = 0.0f; LLEnvironment& environment = LLEnvironment::instance(); LLSettingsWater::ptr_t pwater = environment.getCurrentWater(); @@ -170,7 +169,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass) // Apply magic numbers translating light direction into intensities light_dir.normalize(); F32 ground_proj_sq = light_dir.mV[0] * light_dir.mV[0] + light_dir.mV[1] * light_dir.mV[1]; - light_exp = llmax(32.f, 256.f * powf(ground_proj_sq, 16.0f)); if (0.f < light_diffuse.normalize()) // Normalizing a color? Puzzling... { light_diffuse *= (1.5f + (6.f * ground_proj_sq)); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 9fb9c6346e..b74736a39d 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -367,7 +367,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.DeleteTranscripts", boost::bind(&LLFloaterPreference::onDeleteTranscripts, this)); mCommitCallbackRegistrar.add("UpdateFilter", boost::bind(&LLFloaterPreference::onUpdateFilterTerm, this, false)); // <FS:ND/> Hook up for filtering #ifdef LL_DISCORD - gSavedSettings.getControl("EnableDiscord")->getCommitSignal()->connect(boost::bind(&LLAppViewer::toggleDiscordIntegration, _2)); + gSavedSettings.getControl("EnableDiscord")->getCommitSignal()->connect(boost::bind(&LLAppViewer::updateDiscordActivity)); gSavedSettings.getControl("ShowDiscordActivityDetails")->getCommitSignal()->connect(boost::bind(&LLAppViewer::updateDiscordActivity)); gSavedSettings.getControl("ShowDiscordActivityState")->getCommitSignal()->connect(boost::bind(&LLAppViewer::updateDiscordActivity)); #endif diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index 9e567e3262..6238a1145c 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -71,10 +71,10 @@ LLSLURL::LLSLURL(const std::string& slurl) { LLURI slurl_uri; // parse the slurl as a uri - if (slurl.find(':') == std::string::npos) + if (slurl.find("://") == std::string::npos) { - // There may be no scheme ('secondlife:' etc.) passed in. In that case - // we want to normalize the slurl by putting the appropriate scheme + // There may be no scheme ('secondlife://', 'https://' etc.) passed in. In that + // case we want to normalize the slurl by putting the appropriate scheme // in front of the slurl. So, we grab the appropriate slurl base // from the grid manager which may be http://slurl.com/secondlife/ for maingrid, or // https://<hostname>/region/ for Standalone grid (the word region, not the region name) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 2409b71f00..ba7437798a 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -342,13 +342,11 @@ void pump_idle_startup_network(void) { // while there are message to process: // process one then call display_startup() - S32 num_messages = 0; { LockMessageChecker lmc(gMessageSystem); while (lmc.checkAllMessages(gFrameCount, gServicePump)) { display_startup(); - ++num_messages; } lmc.processAcks(); } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d66da27bc7..7a8a57c03d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6517,7 +6517,7 @@ void handle_look_at_selection(const LLSD& param) } } -void handle_zoom_to_object(const LLUUID& object_id) +bool handle_zoom_to_object(const LLUUID& object_id) { const F32 PADDING_FACTOR = 2.f; @@ -6535,12 +6535,14 @@ void handle_zoom_to_object(const LLUUID& object_id) obj_to_cam.normVec(); - LLVector3d object_center_global = gAgent.getPosGlobalFromAgent(bbox.getCenterAgent()); + LLVector3d object_center_global = gAgent.getPosGlobalFromAgent(bbox.getCenterAgent()); - gAgentCamera.setCameraPosAndFocusGlobal(object_center_global + LLVector3d(obj_to_cam * distance), + gAgentCamera.setCameraPosAndFocusGlobal(object_center_global + LLVector3d(obj_to_cam * distance), object_center_global, object_id ); + return true; } + return false; } class LLAvatarInviteToGroup : public view_listener_t diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 68c3dbc126..522c7e8109 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -73,7 +73,7 @@ void handle_buy(); void handle_take(bool take_separate = false); void handle_take_copy(); void handle_look_at_selection(const LLSD& param); -void handle_zoom_to_object(const LLUUID& object_id); +bool handle_zoom_to_object(const LLUUID& object_id); void handle_object_return(); void handle_object_delete(); void handle_object_edit(); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 5ba0a86e68..52939dbbae 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -524,7 +524,6 @@ void LLViewerTexture::updateClass() bool is_low = is_sys_low || over_pct > 0.f; static bool was_low = false; - static bool was_sys_low = false; if (is_low && !was_low) { @@ -542,7 +541,6 @@ void LLViewerTexture::updateClass() } was_low = is_low; - was_sys_low = is_sys_low; if (is_low) { diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 903d6a035f..c6a7a59034 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4765,14 +4765,6 @@ bool LLVOAvatar::updateCharacter(LLAgent &agent) } bool visible = isVisible(); - bool is_control_avatar = isControlAvatar(); // capture state to simplify tracing - bool is_attachment = false; - - if (is_control_avatar) - { - LLControlAvatar *cav = dynamic_cast<LLControlAvatar*>(this); - is_attachment = cav && cav->mRootVolp && cav->mRootVolp->isAttachment(); // For attached animated objects - } // For fading out the names above heads, only let the timer // run if we're visible. diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index eae71ca454..9667bd028f 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -2308,7 +2308,6 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro(connectionPtr_t connection) return; } - bool iceCompleted = false; LLSD body; if (!connection->mIceCandidates.empty() || connection->mIceCompleted) { @@ -2347,7 +2346,6 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro(connectionPtr_t connection) LLSD body_candidate; body_candidate["completed"] = true; body["candidate"] = body_candidate; - iceCompleted = connection->mIceCompleted; connection->mIceCompleted = false; } @@ -2980,7 +2978,6 @@ void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool b return; } boost::json::object voice_data = voice_data_parsed.as_object(); - bool new_participant = false; boost::json::object mute; boost::json::object user_gain; for (auto &participant_elem : voice_data) @@ -3033,7 +3030,6 @@ void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool b } } - new_participant |= joined; if (!participant && joined && (primary || !isSpatial())) { participant = LLWebRTCVoiceClient::getInstance()->addParticipantByID(mChannelID, agent_id, mRegionID); diff --git a/indra/newview/skins/default/xui/en/menu_object_icon.xml b/indra/newview/skins/default/xui/en/menu_object_icon.xml index f3e520700b..d43ce26e56 100644 --- a/indra/newview/skins/default/xui/en/menu_object_icon.xml +++ b/indra/newview/skins/default/xui/en/menu_object_icon.xml @@ -41,6 +41,17 @@ <menu_item_separator layout="topleft" /> <menu_item_call + label="Zoom in" + layout="topleft" + name="zoom_in"> + <menu_item_call.on_click + function="ObjectIcon.Action" + parameter="obj_zoom_in" /> + <menu_item_call.on_enable + function="ObjectIcon.Visible" + parameter="obj_zoom_in" /> + </menu_item_call> + <menu_item_call label="Show on Map" layout="topleft" name="show_on_map"> diff --git a/indra/newview/skins/default/xui/en/menu_url_objectim.xml b/indra/newview/skins/default/xui/en/menu_url_objectim.xml index 1874c01f8d..fb6081e1fb 100644 --- a/indra/newview/skins/default/xui/en/menu_url_objectim.xml +++ b/indra/newview/skins/default/xui/en/menu_url_objectim.xml @@ -26,6 +26,13 @@ <menu_item_separator layout="topleft" /> <menu_item_call + label="Zoom in" + layout="topleft" + name="zoom_in"> + <menu_item_call.on_click + function="Url.ZoomInObject" /> + </menu_item_call> + <menu_item_call label="Show on Map" layout="topleft" name="show_on_map"> diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index c31e6c94ea..1be34550fa 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -177,6 +177,25 @@ Learn about [https://community.secondlife.com/knowledgebase/joining-and-particip function="People.DelFriend" /> </dnd_button> </panel> + <slider + control_name="NearMeRange" + decimal_digits="0" + increment="1" + follows="left|top" + left="5" + min_val="0" + max_val="4096" + label="Range:" + name="near_me_range" + tool_tip="Nearby people range" + width="230"/> + <text + type="string" + follows="left|top" + left_delta="225" + name="near_me_range_text2"> + m + </text> <layout_stack clip="false" follows="all" @@ -216,7 +235,7 @@ Learn about [https://community.secondlife.com/knowledgebase/joining-and-particip <avatar_list allow_select="true" follows="all" - height="211" + height="197" ignore_online_status="true" layout="topleft" left="3" diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 04c3fea93a..cf5e748513 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -63,7 +63,6 @@ class ViewerManifest(LLManifest): def construct(self): super(ViewerManifest, self).construct() self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg") - self.path(src="../../etc/message.xml", dst="app_settings/message.xml") if self.is_packaging_viewer(): with self.prefix(src_dst="app_settings"): |
