diff options
author | UbitUmarov | 2017-07-20 11:30:12 +0100 |
---|---|---|
committer | UbitUmarov | 2017-07-20 11:30:12 +0100 |
commit | fe6ad384e43c11c3bf6268f5ab6fe3ea37c74540 (patch) | |
tree | 44ae3d8b00f3d2f6bf78bc0226a779f99ed6dc48 /OpenSim/Region/Framework/Scenes/CollisionSounds.cs | |
parent | Merge branch 'master' into httptests (diff) | |
parent | fix object updates throttle for scripts doing motion by direct change of posi... (diff) | |
download | opensim-SC-fe6ad384e43c11c3bf6268f5ab6fe3ea37c74540.zip opensim-SC-fe6ad384e43c11c3bf6268f5ab6fe3ea37c74540.tar.gz opensim-SC-fe6ad384e43c11c3bf6268f5ab6fe3ea37c74540.tar.bz2 opensim-SC-fe6ad384e43c11c3bf6268f5ab6fe3ea37c74540.tar.xz |
merge
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/CollisionSounds.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/CollisionSounds.cs | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs index e76fef4..63aafcd 100644 --- a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs +++ b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs | |||
@@ -116,16 +116,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
116 | 116 | ||
117 | public static void PartCollisionSound(SceneObjectPart part, List<CollisionForSoundInfo> collidersinfolist) | 117 | public static void PartCollisionSound(SceneObjectPart part, List<CollisionForSoundInfo> collidersinfolist) |
118 | { | 118 | { |
119 | if (part.CollisionSoundType < 0) | ||
120 | return; | ||
121 | |||
119 | if (collidersinfolist.Count == 0 || part == null) | 122 | if (collidersinfolist.Count == 0 || part == null) |
120 | return; | 123 | return; |
121 | 124 | ||
122 | if (part.VolumeDetectActive || (part.Flags & PrimFlags.Physics) == 0) | 125 | if (part.VolumeDetectActive || (part.Flags & PrimFlags.Physics) == 0) |
123 | return; | 126 | return; |
124 | 127 | ||
125 | if (part.ParentGroup == null) | 128 | SceneObjectGroup sog = part.ParentGroup; |
129 | if (sog == null || sog.IsDeleted || sog.inTransit) | ||
126 | return; | 130 | return; |
127 | 131 | ||
128 | if (part.CollisionSoundType < 0) | 132 | if(sog.CollisionSoundThrottled(part.CollisionSoundType)) |
129 | return; | 133 | return; |
130 | 134 | ||
131 | float volume = part.CollisionSoundVolume; | 135 | float volume = part.CollisionSoundVolume; |
@@ -189,15 +193,23 @@ namespace OpenSim.Region.Framework.Scenes | |||
189 | continue; | 193 | continue; |
190 | } | 194 | } |
191 | 195 | ||
192 | SceneObjectPart otherPart = part.ParentGroup.Scene.GetSceneObjectPart(id); | 196 | SceneObjectPart otherPart = sog.Scene.GetSceneObjectPart(id); |
193 | if (otherPart != null) | 197 | if (otherPart != null) |
194 | { | 198 | { |
195 | if (otherPart.CollisionSoundType < 0 || otherPart.VolumeDetectActive) | 199 | SceneObjectGroup othersog = otherPart.ParentGroup; |
200 | if(othersog == null || othersog.IsDeleted || othersog.inTransit) | ||
201 | continue; | ||
202 | |||
203 | int otherType = otherPart.CollisionSoundType; | ||
204 | if (otherType < 0 || otherPart.VolumeDetectActive) | ||
196 | continue; | 205 | continue; |
197 | 206 | ||
198 | if (!HaveSound) | 207 | if (!HaveSound) |
199 | { | 208 | { |
200 | if (otherPart.CollisionSoundType == 1) | 209 | if(othersog.CollisionSoundThrottled(otherType)) |
210 | continue; | ||
211 | |||
212 | if (otherType == 1) | ||
201 | { | 213 | { |
202 | soundID = otherPart.CollisionSound; | 214 | soundID = otherPart.CollisionSound; |
203 | volume = otherPart.CollisionSoundVolume; | 215 | volume = otherPart.CollisionSoundVolume; |
@@ -206,7 +218,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
206 | } | 218 | } |
207 | else | 219 | else |
208 | { | 220 | { |
209 | if (otherPart.CollisionSoundType == 2) | 221 | if (otherType == 2) |
210 | { | 222 | { |
211 | volume = otherPart.CollisionSoundVolume; | 223 | volume = otherPart.CollisionSoundVolume; |
212 | if (volume == 0.0f) | 224 | if (volume == 0.0f) |