@@ -7002,22 +7002,21 @@ void process_script_dialog(LLMessageSystem* msg, void**)
70027002
70037003 if (const auto & obj = chatter ? chatter : gObjectList .findObject (owner_id)) // Fallback on the owner, if the chatter isn't present
70047004 {
7005- // Compute the object SLURL.
7006- const auto & pos = obj ? obj->getPositionRegion () : LLVector3::zero;
7007- S32 x = ll_round ((F32 )fmod ((F64 )pos.mV [VX ], (F64 )REGION_WIDTH_METERS ));
7008- S32 y = ll_round ((F32 )fmod ((F64 )pos.mV [VY ], (F64 )REGION_WIDTH_METERS ));
7009- S32 z = ll_round ((F32 )pos.mV [VZ ]);
7010- std::ostringstream location;
7011- location << obj->getRegion () << ' /' << x << ' /' << y << ' /' << z;
7012- if (chatter != obj) location << " ?owner_not_object" ;
7013- auto loc = location.str ();
7014- if (rlv_handler_t::isEnabled () && gRlvHandler .hasBehaviour (RLV_BHVR_SHOWLOC ))
7015- {
7016- auto idxPos = loc.find (' /' );
7017- if ((std::string::npos != idxPos) && (RlvUtil::isNearbyRegion (loc.substr (0 , idxPos))))
7018- loc = RlvStrings::getString (RLV_STRING_HIDDEN_REGION );
7019- }
7020- query_string[" slurl" ] = loc;
7005+ auto & slurl = query_string[" slurl" ];
7006+ const auto & region = obj->getRegion ();
7007+ if (rlv_handler_t::isEnabled () && gRlvHandler .hasBehaviour (RLV_BHVR_SHOWLOC ) && LLWorld::instance ().isRegionListed (region))
7008+ slurl = RlvStrings::getString (RLV_STRING_HIDDEN_REGION );
7009+ else
7010+ {
7011+ const auto & pos = obj->getPositionRegion ();
7012+ S32 x = ll_round ((F32 )fmod ((F64 )pos.mV [VX ], (F64 )REGION_WIDTH_METERS ));
7013+ S32 y = ll_round ((F32 )fmod ((F64 )pos.mV [VY ], (F64 )REGION_WIDTH_METERS ));
7014+ S32 z = ll_round ((F32 )pos.mV [VZ ]);
7015+ std::ostringstream location;
7016+ location << region->getName () << ' /' << x << ' /' << y << ' /' << z;
7017+ if (chatter != obj) location << " ?owner_not_object" ;
7018+ slurl = location.str ();
7019+ }
70217020 }
70227021 query_string[" name" ] = object_name;
70237022 query_string[" groupowned" ] = is_group;
0 commit comments