aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-03-05 20:32:35 +0000
committerJustin Clarke Casey2009-03-05 20:32:35 +0000
commitc213a12b571a42478cb9908ea9d6be1cd9962ba2 (patch)
tree3788c90d03b46c989361a655b085c5e094bf5a07 /OpenSim/Region/Framework
parent* Replace some string to byte conversions for object/item name/description fi... (diff)
downloadopensim-SC_OLD-c213a12b571a42478cb9908ea9d6be1cd9962ba2.zip
opensim-SC_OLD-c213a12b571a42478cb9908ea9d6be1cd9962ba2.tar.gz
opensim-SC_OLD-c213a12b571a42478cb9908ea9d6be1cd9962ba2.tar.bz2
opensim-SC_OLD-c213a12b571a42478cb9908ea9d6be1cd9962ba2.tar.xz
* simplify media and music url setting since we never get back a null land object
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/ILandChannel.cs15
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs29
2 files changed, 20 insertions, 24 deletions
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
35 { 35 {
36 List<ILandObject> ParcelsNearPoint(Vector3 position); 36 List<ILandObject> ParcelsNearPoint(Vector3 position);
37 List<ILandObject> AllParcels(); 37 List<ILandObject> AllParcels();
38
39 /// <summary>
40 /// Get the land object at the specified point
41 /// </summary>
42 /// <param name="x">Value between 0 - 256 on the x axis of the point</param>
43 /// <param name="y">Value between 0 - 256 on the y axis of the point</param>
44 /// <returns>Land object at the point supplied</returns>
38 ILandObject GetLandObject(int x, int y); 45 ILandObject GetLandObject(int x, int y);
46
47 /// <summary>
48 /// Get the land object at the specified point
49 /// </summary>
50 /// <param name="x">Value between 0 - 256 on the x axis of the point</param>
51 /// <param name="y">Value between 0 - 256 on the y axis of the point</param>
52 /// <returns>Land object at the point supplied</returns>
39 ILandObject GetLandObject(float x, float y); 53 ILandObject GetLandObject(float x, float y);
54
40 bool IsLandPrimCountTainted(); 55 bool IsLandPrimCountTainted();
41 bool IsForcefulBansAllowed(); 56 bool IsForcefulBansAllowed();
42 void UpdateLandObject(int localID, LandData data); 57 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
1114 { 1114 {
1115 Heightmap = new TerrainChannel(map); 1115 Heightmap = new TerrainChannel(map);
1116 } 1116 }
1117
1118 } 1117 }
1119 catch (Exception e) 1118 catch (Exception e)
1120 { 1119 {
@@ -3045,40 +3044,22 @@ namespace OpenSim.Region.Framework.Scenes
3045 3044
3046 public LandData GetLandData(uint x, uint y) 3045 public LandData GetLandData(uint x, uint y)
3047 { 3046 {
3048 m_log.DebugFormat("[SCENE] returning land for {0},{1}", x, y); 3047 m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y);
3049 return LandChannel.GetLandObject((int)x, (int)y).landData; 3048 return LandChannel.GetLandObject((int)x, (int)y).landData;
3050 } 3049 }
3051 3050
3052 public void SetLandMusicURL(float x, float y, string url) 3051 public void SetLandMusicURL(float x, float y, string url)
3053 { 3052 {
3054 ILandObject land = LandChannel.GetLandObject(x, y); 3053 ILandObject land = LandChannel.GetLandObject(x, y);
3055 if (land == null) 3054 land.landData.MusicURL = url;
3056 { 3055 land.sendLandUpdateToAvatarsOverMe();
3057 return;
3058 }
3059 else
3060 {
3061 land.landData.MusicURL = url;
3062 land.sendLandUpdateToAvatarsOverMe();
3063 return;
3064 }
3065 } 3056 }
3066 3057
3067 public void SetLandMediaURL(float x, float y, string url) 3058 public void SetLandMediaURL(float x, float y, string url)
3068 { 3059 {
3069 ILandObject land = LandChannel.GetLandObject(x, y); 3060 ILandObject land = LandChannel.GetLandObject(x, y);
3070 3061 land.landData.MediaURL = url;
3071 if (land == null) 3062 land.sendLandUpdateToAvatarsOverMe();
3072 {
3073 return;
3074 }
3075
3076 else
3077 {
3078 land.landData.MediaURL = url;
3079 land.sendLandUpdateToAvatarsOverMe();
3080 return;
3081 }
3082 } 3063 }
3083 3064
3084 public RegionInfo RequestClosestRegion(string name) 3065 public RegionInfo RequestClosestRegion(string name)