diff options
author | UbitUmarov | 2012-05-15 17:01:00 +0100 |
---|---|---|
committer | UbitUmarov | 2012-05-15 17:01:00 +0100 |
commit | 81d7844f5196aeee7a02c924448795820dbf5e8b (patch) | |
tree | c565b9c0c254f1563185dc7a5ea9fe2a52bd05d7 /OpenSim/Region/Framework/Scenes | |
parent | sop colisions don't play sounds on volume detectors (diff) | |
download | opensim-SC-81d7844f5196aeee7a02c924448795820dbf5e8b.zip opensim-SC-81d7844f5196aeee7a02c924448795820dbf5e8b.tar.gz opensim-SC-81d7844f5196aeee7a02c924448795820dbf5e8b.tar.bz2 opensim-SC-81d7844f5196aeee7a02c924448795820dbf5e8b.tar.xz |
use part VolumeDetectActive and not rootPart.VolumeDetectActive to be coerent with other places in case of future changes. Should be equivalent if all is well.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 3850e46..8716e20 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2652,11 +2652,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
2652 | m_lastColliders.Remove(localID); | 2652 | m_lastColliders.Remove(localID); |
2653 | } | 2653 | } |
2654 | // play the sound. | 2654 | // play the sound. |
2655 | if (startedColliders.Count > 0 && CollisionSound != UUID.Zero && CollisionSoundVolume > 0.0f && !ParentGroup.RootPart.VolumeDetectActive) | 2655 | |
2656 | bool IsNotVolumeDtc = !VolumeDetectActive; | ||
2657 | |||
2658 | if (startedColliders.Count > 0 && CollisionSound != UUID.Zero && CollisionSoundVolume > 0.0f && IsNotVolumeDtc) | ||
2656 | SendSound(CollisionSound.ToString(), CollisionSoundVolume, true, (byte)0, 0, false, false); | 2659 | SendSound(CollisionSound.ToString(), CollisionSoundVolume, true, (byte)0, 0, false, false); |
2657 | 2660 | ||
2658 | SendCollisionEvent(scriptEvents.collision_start, startedColliders, ParentGroup.Scene.EventManager.TriggerScriptCollidingStart); | 2661 | SendCollisionEvent(scriptEvents.collision_start, startedColliders, ParentGroup.Scene.EventManager.TriggerScriptCollidingStart); |
2659 | if(!ParentGroup.RootPart.VolumeDetectActive) | 2662 | if (IsNotVolumeDtc) |
2660 | SendCollisionEvent(scriptEvents.collision , m_lastColliders , ParentGroup.Scene.EventManager.TriggerScriptColliding); | 2663 | SendCollisionEvent(scriptEvents.collision , m_lastColliders , ParentGroup.Scene.EventManager.TriggerScriptColliding); |
2661 | SendCollisionEvent(scriptEvents.collision_end , endedColliders , ParentGroup.Scene.EventManager.TriggerScriptCollidingEnd); | 2664 | SendCollisionEvent(scriptEvents.collision_end , endedColliders , ParentGroup.Scene.EventManager.TriggerScriptCollidingEnd); |
2662 | 2665 | ||