diff options
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandChannel.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/ILandChannel.cs | 15 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 29 |
3 files changed, 22 insertions, 31 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs index 97af6f4..9822af7 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs | |||
@@ -74,19 +74,13 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
74 | 74 | ||
75 | #region ILandChannel Members | 75 | #region ILandChannel Members |
76 | 76 | ||
77 | |||
78 | /// <summary> | ||
79 | /// Get the land object at the specified point | ||
80 | /// </summary> | ||
81 | /// <param name="x_float">Value between 0 - 256 on the x axis of the point</param> | ||
82 | /// <param name="y_float">Value between 0 - 256 on the y axis of the point</param> | ||
83 | /// <returns>Land object at the point supplied</returns> | ||
84 | public ILandObject GetLandObject(float x_float, float y_float) | 77 | public ILandObject GetLandObject(float x_float, float y_float) |
85 | { | 78 | { |
86 | if (m_landManagementModule != null) | 79 | if (m_landManagementModule != null) |
87 | { | 80 | { |
88 | return m_landManagementModule.GetLandObject(x_float, y_float); | 81 | return m_landManagementModule.GetLandObject(x_float, y_float); |
89 | } | 82 | } |
83 | |||
90 | ILandObject obj = new LandObject(UUID.Zero, false, m_scene); | 84 | ILandObject obj = new LandObject(UUID.Zero, false, m_scene); |
91 | obj.landData.Name = "NO LAND"; | 85 | obj.landData.Name = "NO LAND"; |
92 | return obj; | 86 | return obj; |
@@ -98,6 +92,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
98 | { | 92 | { |
99 | return m_landManagementModule.GetLandObject(x, y); | 93 | return m_landManagementModule.GetLandObject(x, y); |
100 | } | 94 | } |
95 | |||
101 | ILandObject obj = new LandObject(UUID.Zero, false, m_scene); | 96 | ILandObject obj = new LandObject(UUID.Zero, false, m_scene); |
102 | obj.landData.Name = "NO LAND"; | 97 | obj.landData.Name = "NO LAND"; |
103 | return obj; | 98 | return obj; |
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) |