diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 8716e20..2fb42f4 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1336,11 +1336,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1336 | set { m_sitAnimation = value; } | 1336 | set { m_sitAnimation = value; } |
1337 | } | 1337 | } |
1338 | 1338 | ||
1339 | public UUID invalidCollisionSoundUUID = new UUID("ffffffff-ffff-ffff-ffff-ffffffffffff"); | ||
1340 | |||
1339 | public UUID CollisionSound | 1341 | public UUID CollisionSound |
1340 | { | 1342 | { |
1341 | get { return m_collisionSound; } | 1343 | get { return m_collisionSound; } |
1342 | set | 1344 | set |
1343 | { | 1345 | { |
1344 | m_collisionSound = value; | 1346 | m_collisionSound = value; |
1345 | aggregateScriptEvents(); | 1347 | aggregateScriptEvents(); |
1346 | } | 1348 | } |
@@ -2655,8 +2657,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
2655 | 2657 | ||
2656 | bool IsNotVolumeDtc = !VolumeDetectActive; | 2658 | bool IsNotVolumeDtc = !VolumeDetectActive; |
2657 | 2659 | ||
2658 | if (startedColliders.Count > 0 && CollisionSound != UUID.Zero && CollisionSoundVolume > 0.0f && IsNotVolumeDtc) | 2660 | if (IsNotVolumeDtc && startedColliders.Count > 0 && CollisionSoundVolume > 0.0f && CollisionSound != invalidCollisionSoundUUID) |
2659 | SendSound(CollisionSound.ToString(), CollisionSoundVolume, true, (byte)0, 0, false, false); | 2661 | { |
2662 | if(CollisionSound != UUID.Zero) | ||
2663 | SendSound(CollisionSound.ToString(), CollisionSoundVolume, true, (byte)0, 0, false, false); | ||
2664 | else | ||
2665 | { | ||
2666 | // default sounds | ||
2667 | } | ||
2668 | } | ||
2660 | 2669 | ||
2661 | SendCollisionEvent(scriptEvents.collision_start, startedColliders, ParentGroup.Scene.EventManager.TriggerScriptCollidingStart); | 2670 | SendCollisionEvent(scriptEvents.collision_start, startedColliders, ParentGroup.Scene.EventManager.TriggerScriptCollidingStart); |
2662 | if (IsNotVolumeDtc) | 2671 | if (IsNotVolumeDtc) |
@@ -4743,7 +4752,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4743 | 4752 | ||
4744 | pa.OnCollisionUpdate -= PhysicsCollision; | 4753 | pa.OnCollisionUpdate -= PhysicsCollision; |
4745 | 4754 | ||
4746 | bool hassound = ( CollisionSound != UUID.Zero && CollisionSoundVolume > 0.0f); | 4755 | bool hassound = ( CollisionSound != invalidCollisionSoundUUID); |
4747 | scriptEvents CombinedEvents = AggregateScriptEvents; | 4756 | scriptEvents CombinedEvents = AggregateScriptEvents; |
4748 | 4757 | ||
4749 | // merge with root part | 4758 | // merge with root part |