aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2012-10-30 01:28:03 +0000
committerMelanie2012-10-30 01:28:03 +0000
commitd15d71a7efd2e1d3510111cbc9e617fc113fc29c (patch)
tree9bfc8cf6cbfe480203d18a7f340bfdf7b69244b4
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC_OLD-d15d71a7efd2e1d3510111cbc9e617fc113fc29c.zip
opensim-SC_OLD-d15d71a7efd2e1d3510111cbc9e617fc113fc29c.tar.gz
opensim-SC_OLD-d15d71a7efd2e1d3510111cbc9e617fc113fc29c.tar.bz2
opensim-SC_OLD-d15d71a7efd2e1d3510111cbc9e617fc113fc29c.tar.xz
Put back the collision sound shim into SOP
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index b7f4291..5714fdd 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2864,6 +2864,35 @@ namespace OpenSim.Region.Framework.Scenes
2864 SendLandCollisionEvent(scriptEvents.land_collision_end, ParentGroup.Scene.EventManager.TriggerScriptLandCollidingEnd); 2864 SendLandCollisionEvent(scriptEvents.land_collision_end, ParentGroup.Scene.EventManager.TriggerScriptLandCollidingEnd);
2865 } 2865 }
2866 2866
2867 // The Collision sounds code calls this
2868 public void SendCollisionSound(UUID soundID, double volume, Vector3 position)
2869 {
2870 if (soundID == UUID.Zero)
2871 return;
2872
2873 ISoundModule soundModule = ParentGroup.Scene.RequestModuleInterface<ISoundModule>();
2874 if (soundModule == null)
2875 return;
2876
2877 if (volume > 1)
2878 volume = 1;
2879 if (volume < 0)
2880 volume = 0;
2881
2882 int now = Util.EnvironmentTickCount();
2883 if(Util.EnvironmentTickCountSubtract(now,LastColSoundSentTime) <200)
2884 return;
2885
2886 LastColSoundSentTime = now;
2887
2888 UUID ownerID = OwnerID;
2889 UUID objectID = ParentGroup.RootPart.UUID;
2890 UUID parentID = ParentGroup.UUID;
2891 ulong regionHandle = ParentGroup.Scene.RegionInfo.RegionHandle;
2892
2893 soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle, 0 );
2894 }
2895
2867 public void PhysicsOutOfBounds(Vector3 pos) 2896 public void PhysicsOutOfBounds(Vector3 pos)
2868 { 2897 {
2869 m_log.Error("[PHYSICS]: Physical Object went out of bounds."); 2898 m_log.Error("[PHYSICS]: Physical Object went out of bounds.");