summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2026-08-28 14:03:48 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2026-08-28 14:04:37 +0300
commit6d7abb3f97d64d0232e6499cd1e05baa31d73e5c (patch)
tree288622869f9fafff7c95eb92058453db7fc79c93 /indra/newview/llviewermessage.cpp
parent14833e7f291985f722a5ed8a12f799e9c2a35078 (diff)
#6174 Update and simplify UI
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 059a71c044..240de962e6 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4928,6 +4928,7 @@ bool handle_teleport_access_blocked(LLSD& llsdBlock, const std::string & notific
{
U8 regionAccess = static_cast<U8>(llsdBlock["_region_access"].asInteger());
std::string regionMaturity = LLViewerRegion::accessToString(regionAccess);
+ llsdBlock["REGIONMATURITY_CAP"] = regionMaturity;
LLStringUtil::toLower(regionMaturity);
llsdBlock["REGIONMATURITY"] = regionMaturity;
@@ -5005,8 +5006,17 @@ bool handle_teleport_access_blocked(LLSD& llsdBlock, const std::string & notific
{
if (notificationID == "RegionTPAccessBlocked")
{
- LLFloaterReg::showInstance("maturity_dialog", LLSD((S32)regionAccess));
- skip_notif = true;
+ bool can_change_maturity = (regionAccess == SIM_ACCESS_MATURE) ? gAgent.isMature() : gAgent.isAdult();
+ if (can_change_maturity)
+ {
+ LLFloaterReg::showInstance("maturity_dialog", LLSD((S32)regionAccess));
+ skip_notif = true;
+ }
+ else
+ {
+ gAgent.clearTeleportRequest();
+ tp_failure_notification = LLNotificationsUtil::add("RegionTPAccessBlocked_NotifyAdultsOnly", llsdBlock);
+ }
}
else
{