diff options
author | Robert Adams | 2013-10-07 13:58:17 -0700 |
---|---|---|
committer | Robert Adams | 2013-10-07 13:58:17 -0700 |
commit | 86bf79aa2b60ab33042fc078a177ad3cdaa62e01 (patch) | |
tree | a123b39f20170798a74edf3009aaf6235e003a46 /OpenSim/Region/CoreModules/Avatar | |
parent | varregion: plug in TerrainData class and modify TerrainModule and LLClientVie... (diff) | |
parent | * Added a unique and interesting WebSocket grid login processor by hijacking ... (diff) | |
download | opensim-SC-86bf79aa2b60ab33042fc078a177ad3cdaa62e01.zip opensim-SC-86bf79aa2b60ab33042fc078a177ad3cdaa62e01.tar.gz opensim-SC-86bf79aa2b60ab33042fc078a177ad3cdaa62e01.tar.bz2 opensim-SC-86bf79aa2b60ab33042fc078a177ad3cdaa62e01.tar.xz |
Merge branch 'master' into varregion
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index 7bc5e51..db62b31 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -32,6 +32,7 @@ using log4net; | |||
32 | using Nini.Config; | 32 | using Nini.Config; |
33 | using Mono.Addins; | 33 | using Mono.Addins; |
34 | using OpenMetaverse; | 34 | using OpenMetaverse; |
35 | using OpenMetaverse.StructuredData; | ||
35 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
36 | using OpenSim.Region.Framework.Interfaces; | 37 | using OpenSim.Region.Framework.Interfaces; |
37 | using OpenSim.Region.Framework.Scenes; | 38 | using OpenSim.Region.Framework.Scenes; |
@@ -94,6 +95,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
94 | 95 | ||
95 | public virtual void RegionLoaded(Scene scene) | 96 | public virtual void RegionLoaded(Scene scene) |
96 | { | 97 | { |
98 | if (!m_enabled) | ||
99 | return; | ||
100 | |||
101 | ISimulatorFeaturesModule featuresModule = scene.RequestModuleInterface<ISimulatorFeaturesModule>(); | ||
102 | |||
103 | if (featuresModule != null) | ||
104 | featuresModule.OnSimulatorFeaturesRequest += OnSimulatorFeaturesRequest; | ||
105 | |||
97 | } | 106 | } |
98 | 107 | ||
99 | public virtual void RemoveRegion(Scene scene) | 108 | public virtual void RemoveRegion(Scene scene) |
@@ -351,5 +360,33 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
351 | 360 | ||
352 | return true; | 361 | return true; |
353 | } | 362 | } |
363 | |||
364 | #region SimulatorFeaturesRequest | ||
365 | |||
366 | static OSDInteger m_SayRange, m_WhisperRange, m_ShoutRange; | ||
367 | |||
368 | private void OnSimulatorFeaturesRequest(UUID agentID, ref OSDMap features) | ||
369 | { | ||
370 | OSD extras = new OSDMap(); | ||
371 | if (features.ContainsKey("OpenSimExtras")) | ||
372 | extras = features["OpenSimExtras"]; | ||
373 | else | ||
374 | features["OpenSimExtras"] = extras; | ||
375 | |||
376 | if (m_SayRange == null) | ||
377 | { | ||
378 | // Do this only once | ||
379 | m_SayRange = new OSDInteger(m_saydistance); | ||
380 | m_WhisperRange = new OSDInteger(m_whisperdistance); | ||
381 | m_ShoutRange = new OSDInteger(m_shoutdistance); | ||
382 | } | ||
383 | |||
384 | ((OSDMap)extras)["say-range"] = m_SayRange; | ||
385 | ((OSDMap)extras)["whisper-range"] = m_WhisperRange; | ||
386 | ((OSDMap)extras)["shout-range"] = m_ShoutRange; | ||
387 | |||
388 | } | ||
389 | |||
390 | #endregion | ||
354 | } | 391 | } |
355 | } \ No newline at end of file | 392 | } \ No newline at end of file |