diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ca63d04..3c64219 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -482,6 +482,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
482 | } | 482 | } |
483 | } | 483 | } |
484 | 484 | ||
485 | public bool ParcelAllowSounds | ||
486 | { | ||
487 | get | ||
488 | { | ||
489 | ILandObject land = m_scene.LandChannel.GetLandObject(AbsolutePosition.X, AbsolutePosition.Y); | ||
490 | if (land == null) | ||
491 | return true; | ||
492 | |||
493 | if (land.LandData.AnyAVSounds) | ||
494 | return true; | ||
495 | if (!land.LandData.GroupAVSounds) | ||
496 | return false; | ||
497 | return land.LandData.GroupID == ControllingClient.ActiveGroupId; | ||
498 | } | ||
499 | } | ||
500 | |||
485 | public byte State { get; set; } | 501 | public byte State { get; set; } |
486 | 502 | ||
487 | private AgentManager.ControlFlags m_AgentControlFlags; | 503 | private AgentManager.ControlFlags m_AgentControlFlags; |
@@ -5048,6 +5064,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
5048 | 5064 | ||
5049 | else | 5065 | else |
5050 | { | 5066 | { |
5067 | bool candoparcelSound = ParcelAllowSounds; | ||
5068 | |||
5051 | foreach (uint id in coldata.Keys) | 5069 | foreach (uint id in coldata.Keys) |
5052 | { | 5070 | { |
5053 | thisHitColliders.Add(id); | 5071 | thisHitColliders.Add(id); |
@@ -5055,7 +5073,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5055 | { | 5073 | { |
5056 | startedColliders.Add(id); | 5074 | startedColliders.Add(id); |
5057 | curcontact = coldata[id]; | 5075 | curcontact = coldata[id]; |
5058 | if (Math.Abs(curcontact.RelativeSpeed) > 0.2) | 5076 | if (candoparcelSound && Math.Abs(curcontact.RelativeSpeed) > 0.2) |
5059 | { | 5077 | { |
5060 | soundinfo = new CollisionForSoundInfo(); | 5078 | soundinfo = new CollisionForSoundInfo(); |
5061 | soundinfo.colliderID = id; | 5079 | soundinfo.colliderID = id; |