diff options
author | Revolution | 2010-02-14 15:41:57 -0600 |
---|---|---|
committer | Melanie | 2010-02-14 22:18:46 +0000 |
commit | 9821c4f566e11c75c8d87721777480c5b2e2bd4e (patch) | |
tree | 04cf7edb4cfe07e1f50ce3ee0ca5d846e6a7a379 /OpenSim/Region/CoreModules/World/Sound | |
parent | * SQLite match code casing with regionsettings table field casing (what's wit... (diff) | |
download | opensim-SC_OLD-9821c4f566e11c75c8d87721777480c5b2e2bd4e.zip opensim-SC_OLD-9821c4f566e11c75c8d87721777480c5b2e2bd4e.tar.gz opensim-SC_OLD-9821c4f566e11c75c8d87721777480c5b2e2bd4e.tar.bz2 opensim-SC_OLD-9821c4f566e11c75c8d87721777480c5b2e2bd4e.tar.xz |
Revolution is on the roll again! :)
Fixes: Undo, T-pose of others on login, modifiedBulletX works again, feet now stand on the ground instead of in the ground, adds checks to CombatModule. Adds: Redo, Land Undo, checks to agentUpdate (so one can not fall off of a region), more vehicle parts. Finishes almost all of LSL (1 function left, 2 events).
Direct flames and kudos to Revolution, please
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Sound')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Sound/SoundModule.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs index 37f1f2e..1f5a4ff 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs | |||
@@ -60,7 +60,7 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
60 | } | 60 | } |
61 | 61 | ||
62 | public virtual void PlayAttachedSound( | 62 | public virtual void PlayAttachedSound( |
63 | UUID soundID, UUID ownerID, UUID objectID, double gain, Vector3 position, byte flags) | 63 | UUID soundID, UUID ownerID, UUID objectID, double gain, Vector3 position, byte flags, float radius) |
64 | { | 64 | { |
65 | foreach (ScenePresence p in m_scene.GetAvatars()) | 65 | foreach (ScenePresence p in m_scene.GetAvatars()) |
66 | { | 66 | { |
@@ -69,14 +69,17 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
69 | continue; | 69 | continue; |
70 | 70 | ||
71 | // Scale by distance | 71 | // Scale by distance |
72 | gain = (float)((double)gain*((100.0 - dis) / 100.0)); | 72 | if (radius == 0) |
73 | gain = (float)((double)gain * ((100.0 - dis) / 100.0)); | ||
74 | else | ||
75 | gain = (float)((double)gain * ((radius - dis) / radius)); | ||
73 | 76 | ||
74 | p.ControllingClient.SendPlayAttachedSound(soundID, objectID, ownerID, (float)gain, flags); | 77 | p.ControllingClient.SendPlayAttachedSound(soundID, objectID, ownerID, (float)gain, flags); |
75 | } | 78 | } |
76 | } | 79 | } |
77 | 80 | ||
78 | public virtual void TriggerSound( | 81 | public virtual void TriggerSound( |
79 | UUID soundId, UUID ownerID, UUID objectID, UUID parentID, double gain, Vector3 position, UInt64 handle) | 82 | UUID soundId, UUID ownerID, UUID objectID, UUID parentID, double gain, Vector3 position, UInt64 handle, float radius) |
80 | { | 83 | { |
81 | foreach (ScenePresence p in m_scene.GetAvatars()) | 84 | foreach (ScenePresence p in m_scene.GetAvatars()) |
82 | { | 85 | { |
@@ -85,7 +88,10 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
85 | continue; | 88 | continue; |
86 | 89 | ||
87 | // Scale by distance | 90 | // Scale by distance |
88 | gain = (float)((double)gain*((100.0 - dis) / 100.0)); | 91 | if (radius == 0) |
92 | gain = (float)((double)gain * ((100.0 - dis) / 100.0)); | ||
93 | else | ||
94 | gain = (float)((double)gain * ((radius - dis) / radius)); | ||
89 | 95 | ||
90 | p.ControllingClient.SendTriggeredSound( | 96 | p.ControllingClient.SendTriggeredSound( |
91 | soundId, ownerID, objectID, parentID, handle, position, (float)gain); | 97 | soundId, ownerID, objectID, parentID, handle, position, (float)gain); |