From ac89e89da313bff1e6f145eee1c32cf994d820c9 Mon Sep 17 00:00:00 2001 From: Homer Horwitz Date: Wed, 8 Oct 2008 18:52:50 +0000 Subject: - Fix wrong order of max/min usage for clipping. Uses Util.Clamp now - Add support for immediate switching of Music/Media URLs. Radio-scripts should work now. --- OpenSim/Region/Environment/Modules/World/Land/LandObject.cs | 4 ++-- OpenSim/Region/Environment/Scenes/Scene.cs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index 89d7b69..14f43b4 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs @@ -294,8 +294,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land try { over = - m_scene.LandChannel.GetLandObject((int) Math.Max(255, Math.Min(0, Math.Round(avatars[i].AbsolutePosition.X))), - (int) Math.Max(255, Math.Min(0, Math.Round(avatars[i].AbsolutePosition.Y)))); + m_scene.LandChannel.GetLandObject(Util.Clamp((int)Math.Round(avatars[i].AbsolutePosition.X), 0, 255), + Util.Clamp((int)Math.Round(avatars[i].AbsolutePosition.Y), 0, 255)); } catch (Exception) { diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 9328501..27c315c 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -3625,6 +3625,7 @@ namespace OpenSim.Region.Environment.Scenes else { land.landData.MusicURL = url; + land.sendLandUpdateToAvatarsOverMe(); return; } } @@ -3641,6 +3642,7 @@ namespace OpenSim.Region.Environment.Scenes else { land.landData.MediaURL = url; + land.sendLandUpdateToAvatarsOverMe(); return; } } -- cgit v1.1