aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs20
1 files changed, 4 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 5874d34..b5705b7 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2632,7 +2632,6 @@ namespace OpenSim.Region.Framework.Scenes
2632 2632
2633 else 2633 else
2634 { 2634 {
2635
2636 // calculate things that started colliding this time 2635 // calculate things that started colliding this time
2637 // and build up list of colliders this time 2636 // and build up list of colliders this time
2638 foreach (uint localid in collissionswith.Keys) 2637 foreach (uint localid in collissionswith.Keys)
@@ -2657,22 +2656,13 @@ namespace OpenSim.Region.Framework.Scenes
2657 foreach (uint localID in endedColliders) 2656 foreach (uint localID in endedColliders)
2658 m_lastColliders.Remove(localID); 2657 m_lastColliders.Remove(localID);
2659 } 2658 }
2659
2660 // play the sound. 2660 // play the sound.
2661 2661
2662 bool IsNotVolumeDtc = !VolumeDetectActive; 2662 bool IsNotVolumeDtc = !VolumeDetectActive;
2663 2663
2664 if (IsNotVolumeDtc && startedColliders.Count > 0 && CollisionSound != invalidCollisionSoundUUID) 2664 if (IsNotVolumeDtc && startedColliders.Count > 0 && CollisionSound != invalidCollisionSoundUUID)
2665 { 2665 CollisionSounds.PartCollisionSound(this, startedColliders);
2666 if (CollisionSound != UUID.Zero)
2667 {
2668 if (CollisionSoundVolume > 0.0f)
2669 SendCollisionSound(CollisionSound, CollisionSoundVolume);
2670 }
2671 else
2672 {
2673 CollisionSounds.PartCollisionSound(this, startedColliders);
2674 }
2675 }
2676 2666
2677 SendCollisionEvent(scriptEvents.collision_start, startedColliders, ParentGroup.Scene.EventManager.TriggerScriptCollidingStart); 2667 SendCollisionEvent(scriptEvents.collision_start, startedColliders, ParentGroup.Scene.EventManager.TriggerScriptCollidingStart);
2678 if (IsNotVolumeDtc) 2668 if (IsNotVolumeDtc)
@@ -3206,12 +3196,11 @@ namespace OpenSim.Region.Framework.Scenes
3206 } 3196 }
3207 } 3197 }
3208 3198
3209 public void SendCollisionSound(UUID soundID, double volume) 3199 public void SendCollisionSound(UUID soundID, double volume, Vector3 position)
3210 { 3200 {
3211 if (soundID == UUID.Zero) 3201 if (soundID == UUID.Zero)
3212 return; 3202 return;
3213 3203
3214
3215 ISoundModule soundModule = ParentGroup.Scene.RequestModuleInterface<ISoundModule>(); 3204 ISoundModule soundModule = ParentGroup.Scene.RequestModuleInterface<ISoundModule>();
3216 if (soundModule == null) 3205 if (soundModule == null)
3217 return; 3206 return;
@@ -3230,10 +3219,9 @@ namespace OpenSim.Region.Framework.Scenes
3230 UUID ownerID = OwnerID; 3219 UUID ownerID = OwnerID;
3231 UUID objectID = ParentGroup.RootPart.UUID; 3220 UUID objectID = ParentGroup.RootPart.UUID;
3232 UUID parentID = ParentGroup.UUID; 3221 UUID parentID = ParentGroup.UUID;
3233 Vector3 position = AbsolutePosition; // region local
3234 ulong regionHandle = ParentGroup.Scene.RegionInfo.RegionHandle; 3222 ulong regionHandle = ParentGroup.Scene.RegionInfo.RegionHandle;
3235 3223
3236 soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle, 0); 3224 soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle, 0 );
3237 } 3225 }
3238 3226
3239 3227