From c213a12b571a42478cb9908ea9d6be1cd9962ba2 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 5 Mar 2009 20:32:35 +0000 Subject: * simplify media and music url setting since we never get back a null land object --- .../Region/Framework/Interfaces/ILandChannel.cs | 15 +++++++++++ OpenSim/Region/Framework/Scenes/Scene.cs | 29 ++++------------------ 2 files changed, 20 insertions(+), 24 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/ILandChannel.cs b/OpenSim/Region/Framework/Interfaces/ILandChannel.cs index 341dd3e..0249025 100644 --- a/OpenSim/Region/Framework/Interfaces/ILandChannel.cs +++ b/OpenSim/Region/Framework/Interfaces/ILandChannel.cs @@ -35,8 +35,23 @@ namespace OpenSim.Region.Framework.Interfaces { List ParcelsNearPoint(Vector3 position); List AllParcels(); + + /// + /// Get the land object at the specified point + /// + /// Value between 0 - 256 on the x axis of the point + /// Value between 0 - 256 on the y axis of the point + /// Land object at the point supplied ILandObject GetLandObject(int x, int y); + + /// + /// Get the land object at the specified point + /// + /// Value between 0 - 256 on the x axis of the point + /// Value between 0 - 256 on the y axis of the point + /// Land object at the point supplied ILandObject GetLandObject(float x, float y); + bool IsLandPrimCountTainted(); bool IsForcefulBansAllowed(); void UpdateLandObject(int localID, LandData data); diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 1dcc8be..faa3bd7 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1114,7 +1114,6 @@ namespace OpenSim.Region.Framework.Scenes { Heightmap = new TerrainChannel(map); } - } catch (Exception e) { @@ -3045,40 +3044,22 @@ namespace OpenSim.Region.Framework.Scenes public LandData GetLandData(uint x, uint y) { - m_log.DebugFormat("[SCENE] returning land for {0},{1}", x, y); + m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y); return LandChannel.GetLandObject((int)x, (int)y).landData; } public void SetLandMusicURL(float x, float y, string url) { ILandObject land = LandChannel.GetLandObject(x, y); - if (land == null) - { - return; - } - else - { - land.landData.MusicURL = url; - land.sendLandUpdateToAvatarsOverMe(); - return; - } + land.landData.MusicURL = url; + land.sendLandUpdateToAvatarsOverMe(); } public void SetLandMediaURL(float x, float y, string url) { ILandObject land = LandChannel.GetLandObject(x, y); - - if (land == null) - { - return; - } - - else - { - land.landData.MediaURL = url; - land.sendLandUpdateToAvatarsOverMe(); - return; - } + land.landData.MediaURL = url; + land.sendLandUpdateToAvatarsOverMe(); } public RegionInfo RequestClosestRegion(string name) -- cgit v1.1