mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 18:55:58 +08:00
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>
This commit is contained in:
@@ -60,7 +60,7 @@ namespace OpenSim.Region.CoreModules.World.Sound
|
||||
}
|
||||
|
||||
public virtual void PlayAttachedSound(
|
||||
UUID soundID, UUID ownerID, UUID objectID, double gain, Vector3 position, byte flags)
|
||||
UUID soundID, UUID ownerID, UUID objectID, double gain, Vector3 position, byte flags, float radius)
|
||||
{
|
||||
foreach (ScenePresence p in m_scene.GetAvatars())
|
||||
{
|
||||
@@ -69,14 +69,17 @@ namespace OpenSim.Region.CoreModules.World.Sound
|
||||
continue;
|
||||
|
||||
// Scale by distance
|
||||
gain = (float)((double)gain*((100.0 - dis) / 100.0));
|
||||
if (radius == 0)
|
||||
gain = (float)((double)gain * ((100.0 - dis) / 100.0));
|
||||
else
|
||||
gain = (float)((double)gain * ((radius - dis) / radius));
|
||||
|
||||
p.ControllingClient.SendPlayAttachedSound(soundID, objectID, ownerID, (float)gain, flags);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void TriggerSound(
|
||||
UUID soundId, UUID ownerID, UUID objectID, UUID parentID, double gain, Vector3 position, UInt64 handle)
|
||||
UUID soundId, UUID ownerID, UUID objectID, UUID parentID, double gain, Vector3 position, UInt64 handle, float radius)
|
||||
{
|
||||
foreach (ScenePresence p in m_scene.GetAvatars())
|
||||
{
|
||||
@@ -85,7 +88,10 @@ namespace OpenSim.Region.CoreModules.World.Sound
|
||||
continue;
|
||||
|
||||
// Scale by distance
|
||||
gain = (float)((double)gain*((100.0 - dis) / 100.0));
|
||||
if (radius == 0)
|
||||
gain = (float)((double)gain * ((100.0 - dis) / 100.0));
|
||||
else
|
||||
gain = (float)((double)gain * ((radius - dis) / radius));
|
||||
|
||||
p.ControllingClient.SendTriggeredSound(
|
||||
soundId, ownerID, objectID, parentID, handle, position, (float)gain);
|
||||
|
||||
Reference in New Issue
Block a user