diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 723affb695ae887c3a9819a01d8519fd0091da7d..54fe1cdf23f6dd2060d26e0007823587eaf511bd 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -3341,6 +3341,40 @@ std::string LLViewerRegion::getMapServerURL() const } +U32 LLViewerRegion::getChatRange() const +{ + U32 range = 20; + if (mSimulatorFeatures.has("OpenSimExtras") + && mSimulatorFeatures["OpenSimExtras"].has("say-range")) + { + range = mSimulatorFeatures["OpenSimExtras"]["say-range"].asInteger(); + } + return range; +} + +U32 LLViewerRegion::getShoutRange() const +{ + U32 range = 100; + if (mSimulatorFeatures.has("OpenSimExtras") + && mSimulatorFeatures["OpenSimExtras"].has("shout-range")) + { + range = mSimulatorFeatures["OpenSimExtras"]["shout-range"].asInteger(); + } + return range; +} + +U32 LLViewerRegion::getWhisperRange() const +{ + U32 range = 10; + if (mSimulatorFeatures.has("OpenSimExtras") + && mSimulatorFeatures["OpenSimExtras"].has("whisper-range")) + { + range = mSimulatorFeatures["OpenSimExtras"]["whisper-range"].asInteger(); + } + return range; +} + + const LLViewerRegion::tex_matrix_t& LLViewerRegion::getWorldMapTiles() const { if (mWorldMapTiles.empty()) diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 4596f5b01712b17ab0c3acbcbeaf8066ed9da77c..6b39b4003f1db92436d2939fa0e472cdc8a602fa 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -393,6 +393,12 @@ class LLViewerRegion final : public LLCapabilityProvider // implements this inte /// Hypergrid map server url std::string getMapServerURL() const; + /// Chat Range (0.8.1) + U32 getChatRange() const; + /// Shout Range (0.8.1) + U32 getShoutRange() const; + /// Whisper Range (0.8.1) + U32 getWhisperRange() const; typedef std::vector<LLPointer<LLViewerTexture> > tex_matrix_t; const tex_matrix_t& getWorldMapTiles() const;