From 8e12f04a6d5a9e740ab9086d885d980899bc14d5 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Thu, 2 Jul 2020 21:59:27 -0400 Subject: [PATCH] Code to support coming changes for netmap --- indra/newview/llviewerregion.cpp | 34 ++++++++++++++++++++++++++++++++ indra/newview/llviewerregion.h | 6 ++++++ 2 files changed, 40 insertions(+) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 723affb695a..54fe1cdf23f 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 4596f5b0171..6b39b4003f1 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; -- GitLab