aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs12
1 files changed, 4 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs
index f3ec572..14914b6 100644
--- a/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs
+++ b/OpenSim/Region/CoreModules/World/Sound/SoundModuleNonShared.cs
@@ -130,12 +130,10 @@ namespace OpenSim.Region.CoreModules.World.Sound
130 dis = 0; 130 dis = 0;
131 } 131 }
132 132
133 float thisSpGain;
134
135 // Scale by distance 133 // Scale by distance
136 thisSpGain = (float)((double)gain * ((radius - dis) / radius)); 134 double thisSpGain = gain * ((radius - dis) / radius);
137 135
138 sp.ControllingClient.SendPlayAttachedSound(soundID, objectID, ownerID, thisSpGain, flags); 136 sp.ControllingClient.SendPlayAttachedSound(soundID, objectID, ownerID, (float)thisSpGain, flags);
139 }); 137 });
140 } 138 }
141 139
@@ -170,13 +168,11 @@ namespace OpenSim.Region.CoreModules.World.Sound
170 if (dis > MaxDistance) // Max audio distance 168 if (dis > MaxDistance) // Max audio distance
171 return; 169 return;
172 170
173 float thisSpGain;
174
175 // Scale by distance 171 // Scale by distance
176 thisSpGain = (float)((double)gain * ((radius - dis) / radius)); 172 double thisSpGain = gain * ((radius - dis) / radius);
177 173
178 sp.ControllingClient.SendTriggeredSound( 174 sp.ControllingClient.SendTriggeredSound(
179 soundId, ownerID, objectID, parentID, handle, position, thisSpGain); 175 soundId, ownerID, objectID, parentID, handle, position, (float)thisSpGain);
180 }); 176 });
181 } 177 }
182 178