diff options
author | UbitUmarov | 2015-08-19 08:48:50 +0100 |
---|---|---|
committer | UbitUmarov | 2015-08-19 08:48:50 +0100 |
commit | 0b105da626ae8c2fb519a817b827f90534ed7d08 (patch) | |
tree | 509e6d091fb12f38fd09528335e51aeedbe59c08 /OpenSim/Tests | |
parent | Merge branch 'master' into ubitworkmaster (diff) | |
parent | varregion: update MapImageServiceModule to upload multiple map tiles for larg... (diff) | |
download | opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.zip opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.tar.gz opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.tar.bz2 opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.tar.xz |
Merge branch 'mbworkvar2' into ubitvar
Diffstat (limited to 'OpenSim/Tests')
-rw-r--r-- | OpenSim/Tests/Clients/Grid/GridClient.cs | 8 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs | 10 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs | 29 |
3 files changed, 33 insertions, 14 deletions
diff --git a/OpenSim/Tests/Clients/Grid/GridClient.cs b/OpenSim/Tests/Clients/Grid/GridClient.cs index 8e33373..fed7a16 100644 --- a/OpenSim/Tests/Clients/Grid/GridClient.cs +++ b/OpenSim/Tests/Clients/Grid/GridClient.cs | |||
@@ -150,16 +150,16 @@ namespace OpenSim.Tests.Clients.GridClient | |||
150 | 150 | ||
151 | Console.WriteLine("[GRID CLIENT]: *** GetRegionRange (this should return 2 regions)"); | 151 | Console.WriteLine("[GRID CLIENT]: *** GetRegionRange (this should return 2 regions)"); |
152 | regions = m_Connector.GetRegionRange(UUID.Zero, | 152 | regions = m_Connector.GetRegionRange(UUID.Zero, |
153 | 900 * (int)Constants.RegionSize, 1002 * (int) Constants.RegionSize, | 153 | (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002), |
154 | 900 * (int)Constants.RegionSize, 1002 * (int) Constants.RegionSize); | 154 | (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002) ); |
155 | if (regions == null) | 155 | if (regions == null) |
156 | Console.WriteLine("[GRID CLIENT]: GetRegionRange returned null"); | 156 | Console.WriteLine("[GRID CLIENT]: GetRegionRange returned null"); |
157 | else | 157 | else |
158 | Console.WriteLine("[GRID CLIENT]: GetRegionRange returned " + regions.Count + " regions"); | 158 | Console.WriteLine("[GRID CLIENT]: GetRegionRange returned " + regions.Count + " regions"); |
159 | Console.WriteLine("[GRID CLIENT]: *** GetRegionRange (this should return 0 regions)"); | 159 | Console.WriteLine("[GRID CLIENT]: *** GetRegionRange (this should return 0 regions)"); |
160 | regions = m_Connector.GetRegionRange(UUID.Zero, | 160 | regions = m_Connector.GetRegionRange(UUID.Zero, |
161 | 900 * (int)Constants.RegionSize, 950 * (int)Constants.RegionSize, | 161 | (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(950), |
162 | 900 * (int)Constants.RegionSize, 950 * (int)Constants.RegionSize); | 162 | (int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(950) ); |
163 | if (regions == null) | 163 | if (regions == null) |
164 | Console.WriteLine("[GRID CLIENT]: GetRegionRange returned null"); | 164 | Console.WriteLine("[GRID CLIENT]: GetRegionRange returned null"); |
165 | else | 165 | else |
diff --git a/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs b/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs index 52a17e7..84de47f 100644 --- a/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs | |||
@@ -69,9 +69,7 @@ namespace OpenSim.Tests.Common | |||
69 | tc.OnTestClientInformClientOfNeighbour += (neighbourHandle, neighbourExternalEndPoint) => | 69 | tc.OnTestClientInformClientOfNeighbour += (neighbourHandle, neighbourExternalEndPoint) => |
70 | { | 70 | { |
71 | uint x, y; | 71 | uint x, y; |
72 | Utils.LongToUInts(neighbourHandle, out x, out y); | 72 | Util.RegionHandleToRegionLoc(neighbourHandle, out x, out y); |
73 | x /= Constants.RegionSize; | ||
74 | y /= Constants.RegionSize; | ||
75 | 73 | ||
76 | m_log.DebugFormat( | 74 | m_log.DebugFormat( |
77 | "[TEST CLIENT]: Processing inform client of neighbour located at {0},{1} at {2}", | 75 | "[TEST CLIENT]: Processing inform client of neighbour located at {0},{1} at {2}", |
@@ -104,9 +102,7 @@ namespace OpenSim.Tests.Common | |||
104 | += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) => | 102 | += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) => |
105 | { | 103 | { |
106 | uint x, y; | 104 | uint x, y; |
107 | Utils.LongToUInts(regionHandle, out x, out y); | 105 | Util.RegionHandleToRegionLoc(regionHandle, out x, out y); |
108 | x /= Constants.RegionSize; | ||
109 | y /= Constants.RegionSize; | ||
110 | 106 | ||
111 | m_log.DebugFormat( | 107 | m_log.DebugFormat( |
112 | "[TEST CLIENT]: Processing send region teleport for destination at {0},{1} at {2}", | 108 | "[TEST CLIENT]: Processing send region teleport for destination at {0},{1} at {2}", |
@@ -125,4 +121,4 @@ namespace OpenSim.Tests.Common | |||
125 | }; | 121 | }; |
126 | } | 122 | } |
127 | } | 123 | } |
128 | } \ No newline at end of file | 124 | } |
diff --git a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs index 5c1ec0b..3ab9020 100644 --- a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs +++ b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs | |||
@@ -69,11 +69,21 @@ namespace OpenSim.Data.Null | |||
69 | m_store.StoreTerrain(terrain, regionID); | 69 | m_store.StoreTerrain(terrain, regionID); |
70 | } | 70 | } |
71 | 71 | ||
72 | public void StoreTerrain(TerrainData terrain, UUID regionID) | ||
73 | { | ||
74 | m_store.StoreTerrain(terrain, regionID); | ||
75 | } | ||
76 | |||
72 | public double[,] LoadTerrain(UUID regionID) | 77 | public double[,] LoadTerrain(UUID regionID) |
73 | { | 78 | { |
74 | return m_store.LoadTerrain(regionID); | 79 | return m_store.LoadTerrain(regionID); |
75 | } | 80 | } |
76 | 81 | ||
82 | public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) | ||
83 | { | ||
84 | return m_store.LoadTerrain(regionID, pSizeX, pSizeY, pSizeZ); | ||
85 | } | ||
86 | |||
77 | public void StoreLandObject(ILandObject Parcel) | 87 | public void StoreLandObject(ILandObject Parcel) |
78 | { | 88 | { |
79 | m_store.StoreLandObject(Parcel); | 89 | m_store.StoreLandObject(Parcel); |
@@ -159,7 +169,7 @@ namespace OpenSim.Data.Null | |||
159 | protected Dictionary<UUID, SceneObjectPart> m_sceneObjectParts = new Dictionary<UUID, SceneObjectPart>(); | 169 | protected Dictionary<UUID, SceneObjectPart> m_sceneObjectParts = new Dictionary<UUID, SceneObjectPart>(); |
160 | protected Dictionary<UUID, ICollection<TaskInventoryItem>> m_primItems | 170 | protected Dictionary<UUID, ICollection<TaskInventoryItem>> m_primItems |
161 | = new Dictionary<UUID, ICollection<TaskInventoryItem>>(); | 171 | = new Dictionary<UUID, ICollection<TaskInventoryItem>>(); |
162 | protected Dictionary<UUID, double[,]> m_terrains = new Dictionary<UUID, double[,]>(); | 172 | protected Dictionary<UUID, TerrainData> m_terrains = new Dictionary<UUID, TerrainData>(); |
163 | protected Dictionary<UUID, LandData> m_landData = new Dictionary<UUID, LandData>(); | 173 | protected Dictionary<UUID, LandData> m_landData = new Dictionary<UUID, LandData>(); |
164 | 174 | ||
165 | public void Initialise(string dbfile) | 175 | public void Initialise(string dbfile) |
@@ -304,12 +314,17 @@ namespace OpenSim.Data.Null | |||
304 | return new List<SceneObjectGroup>(objects.Values); | 314 | return new List<SceneObjectGroup>(objects.Values); |
305 | } | 315 | } |
306 | 316 | ||
307 | public void StoreTerrain(double[,] ter, UUID regionID) | 317 | public void StoreTerrain(TerrainData ter, UUID regionID) |
308 | { | 318 | { |
309 | m_terrains[regionID] = ter; | 319 | m_terrains[regionID] = ter; |
310 | } | 320 | } |
311 | 321 | ||
312 | public double[,] LoadTerrain(UUID regionID) | 322 | public void StoreTerrain(double[,] ter, UUID regionID) |
323 | { | ||
324 | m_terrains[regionID] = new HeightmapTerrainData(ter); | ||
325 | } | ||
326 | |||
327 | public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) | ||
313 | { | 328 | { |
314 | if (m_terrains.ContainsKey(regionID)) | 329 | if (m_terrains.ContainsKey(regionID)) |
315 | return m_terrains[regionID]; | 330 | return m_terrains[regionID]; |
@@ -317,6 +332,14 @@ namespace OpenSim.Data.Null | |||
317 | return null; | 332 | return null; |
318 | } | 333 | } |
319 | 334 | ||
335 | public double[,] LoadTerrain(UUID regionID) | ||
336 | { | ||
337 | if (m_terrains.ContainsKey(regionID)) | ||
338 | return m_terrains[regionID].GetDoubles(); | ||
339 | else | ||
340 | return null; | ||
341 | } | ||
342 | |||
320 | public void RemoveLandObject(UUID globalID) | 343 | public void RemoveLandObject(UUID globalID) |
321 | { | 344 | { |
322 | if (m_landData.ContainsKey(globalID)) | 345 | if (m_landData.ContainsKey(globalID)) |