aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorUbitUmarov2012-05-16 12:27:49 +0100
committerUbitUmarov2012-05-16 12:27:49 +0100
commitea47b0362548101d201f3bef26436d3420d791fd (patch)
treed3485e1923c9918b5e342fb93e2d0c46f5a21296 /OpenSim/Region/Framework/Scenes
parent use part VolumeDetectActive and not rootPart.VolumeDetectActive to be coeren... (diff)
downloadopensim-SC_OLD-ea47b0362548101d201f3bef26436d3420d791fd.zip
opensim-SC_OLD-ea47b0362548101d201f3bef26436d3420d791fd.tar.gz
opensim-SC_OLD-ea47b0362548101d201f3bef26436d3420d791fd.tar.bz2
opensim-SC_OLD-ea47b0362548101d201f3bef26436d3420d791fd.tar.xz
Added a invalidCollisionSoundUUID so that scripts can stop all collision sounds with llCollisionSound("",...). UUID.Zero means defaults should be used. In case part has several scripts with confliting llCollisionSound result depende on exec order. Specially on reset the efect of "" depends on reset order, it should override the others. This is intermediate improve(?) since collisions sounds seem to need a deaper revision.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs17
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