diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Tests/Clients/Grid/GridClient.cs | 8 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Helpers/EntityTransferHelpers.cs | 8 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 3 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs | 29 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs | 11 | ||||
-rw-r--r-- | OpenSim/Tests/Performance/NPCPerformanceTests.cs | 4 |
6 files changed, 44 insertions, 19 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..049200c 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}", |
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index 4cdfe98..008f2d0 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs | |||
@@ -186,8 +186,9 @@ namespace OpenSim.Tests.Common | |||
186 | 186 | ||
187 | PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager(); | 187 | PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager(); |
188 | physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll"); | 188 | physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll"); |
189 | Vector3 regionExtent = new Vector3( regInfo.RegionSizeX, regInfo.RegionSizeY, regInfo.RegionSizeZ); | ||
189 | testScene.PhysicsScene | 190 | testScene.PhysicsScene |
190 | = physicsPluginManager.GetPhysicsScene("basicphysics", "ZeroMesher", new IniConfigSource(), "test"); | 191 | = physicsPluginManager.GetPhysicsScene("basicphysics", "ZeroMesher", new IniConfigSource(), "test", regionExtent); |
191 | 192 | ||
192 | testScene.RegionInfo.EstateSettings = new EstateSettings(); | 193 | testScene.RegionInfo.EstateSettings = new EstateSettings(); |
193 | testScene.LoginsEnabled = true; | 194 | testScene.LoginsEnabled = true; |
diff --git a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs index ed29c39..5df8e04 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); |
@@ -154,7 +164,7 @@ namespace OpenSim.Data.Null | |||
154 | protected Dictionary<UUID, SceneObjectPart> m_sceneObjectParts = new Dictionary<UUID, SceneObjectPart>(); | 164 | protected Dictionary<UUID, SceneObjectPart> m_sceneObjectParts = new Dictionary<UUID, SceneObjectPart>(); |
155 | protected Dictionary<UUID, ICollection<TaskInventoryItem>> m_primItems | 165 | protected Dictionary<UUID, ICollection<TaskInventoryItem>> m_primItems |
156 | = new Dictionary<UUID, ICollection<TaskInventoryItem>>(); | 166 | = new Dictionary<UUID, ICollection<TaskInventoryItem>>(); |
157 | protected Dictionary<UUID, double[,]> m_terrains = new Dictionary<UUID, double[,]>(); | 167 | protected Dictionary<UUID, TerrainData> m_terrains = new Dictionary<UUID, TerrainData>(); |
158 | protected Dictionary<UUID, LandData> m_landData = new Dictionary<UUID, LandData>(); | 168 | protected Dictionary<UUID, LandData> m_landData = new Dictionary<UUID, LandData>(); |
159 | 169 | ||
160 | public void Initialise(string dbfile) | 170 | public void Initialise(string dbfile) |
@@ -299,12 +309,17 @@ namespace OpenSim.Data.Null | |||
299 | return new List<SceneObjectGroup>(objects.Values); | 309 | return new List<SceneObjectGroup>(objects.Values); |
300 | } | 310 | } |
301 | 311 | ||
302 | public void StoreTerrain(double[,] ter, UUID regionID) | 312 | public void StoreTerrain(TerrainData ter, UUID regionID) |
303 | { | 313 | { |
304 | m_terrains[regionID] = ter; | 314 | m_terrains[regionID] = ter; |
305 | } | 315 | } |
306 | 316 | ||
307 | public double[,] LoadTerrain(UUID regionID) | 317 | public void StoreTerrain(double[,] ter, UUID regionID) |
318 | { | ||
319 | m_terrains[regionID] = new HeightmapTerrainData(ter); | ||
320 | } | ||
321 | |||
322 | public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) | ||
308 | { | 323 | { |
309 | if (m_terrains.ContainsKey(regionID)) | 324 | if (m_terrains.ContainsKey(regionID)) |
310 | return m_terrains[regionID]; | 325 | return m_terrains[regionID]; |
@@ -312,6 +327,14 @@ namespace OpenSim.Data.Null | |||
312 | return null; | 327 | return null; |
313 | } | 328 | } |
314 | 329 | ||
330 | public double[,] LoadTerrain(UUID regionID) | ||
331 | { | ||
332 | if (m_terrains.ContainsKey(regionID)) | ||
333 | return m_terrains[regionID].GetDoubles(); | ||
334 | else | ||
335 | return null; | ||
336 | } | ||
337 | |||
315 | public void RemoveLandObject(UUID globalID) | 338 | public void RemoveLandObject(UUID globalID) |
316 | { | 339 | { |
317 | if (m_landData.ContainsKey(globalID)) | 340 | if (m_landData.ContainsKey(globalID)) |
diff --git a/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs b/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs index e666433..f2bae58 100644 --- a/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs +++ b/OpenSim/Tests/Common/Mock/TestEventQueueGetModule.cs | |||
@@ -114,22 +114,25 @@ namespace OpenSim.Tests.Common | |||
114 | AddEvent(avatarID, "DisableSimulator", handle); | 114 | AddEvent(avatarID, "DisableSimulator", handle); |
115 | } | 115 | } |
116 | 116 | ||
117 | public void EnableSimulator (ulong handle, IPEndPoint endPoint, UUID avatarID) | 117 | public void EnableSimulator (ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY) |
118 | { | 118 | { |
119 | AddEvent(avatarID, "EnableSimulator", handle); | 119 | AddEvent(avatarID, "EnableSimulator", handle); |
120 | } | 120 | } |
121 | 121 | ||
122 | public void EstablishAgentCommunication (UUID avatarID, IPEndPoint endPoint, string capsPath) | 122 | public void EstablishAgentCommunication (UUID avatarID, IPEndPoint endPoint, string capsPath, |
123 | ulong regionHandle, int regionSizeX, int regionSizeY) | ||
123 | { | 124 | { |
124 | AddEvent(avatarID, "EstablishAgentCommunication", endPoint, capsPath); | 125 | AddEvent(avatarID, "EstablishAgentCommunication", endPoint, capsPath); |
125 | } | 126 | } |
126 | 127 | ||
127 | public void TeleportFinishEvent (ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL, UUID agentID) | 128 | public void TeleportFinishEvent (ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, |
129 | uint locationID, uint flags, string capsURL, UUID agentID, int regionSizeX, int regionSizeY) | ||
128 | { | 130 | { |
129 | AddEvent(agentID, "TeleportFinishEvent", regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL); | 131 | AddEvent(agentID, "TeleportFinishEvent", regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL); |
130 | } | 132 | } |
131 | 133 | ||
132 | public void CrossRegion (ulong handle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL, UUID avatarID, UUID sessionID) | 134 | public void CrossRegion (ulong handle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, |
135 | string capsURL, UUID avatarID, UUID sessionID, int regionSizeX, int regionSizeY) | ||
133 | { | 136 | { |
134 | AddEvent(avatarID, "CrossRegion", handle, pos, lookAt, newRegionExternalEndPoint, capsURL, sessionID); | 137 | AddEvent(avatarID, "CrossRegion", handle, pos, lookAt, newRegionExternalEndPoint, capsURL, sessionID); |
135 | } | 138 | } |
diff --git a/OpenSim/Tests/Performance/NPCPerformanceTests.cs b/OpenSim/Tests/Performance/NPCPerformanceTests.cs index 2026a88..eb09061 100644 --- a/OpenSim/Tests/Performance/NPCPerformanceTests.cs +++ b/OpenSim/Tests/Performance/NPCPerformanceTests.cs | |||
@@ -144,6 +144,7 @@ namespace OpenSim.Tests.Performance | |||
144 | // ScenePresence.SendInitialData() to reset our entire appearance. | 144 | // ScenePresence.SendInitialData() to reset our entire appearance. |
145 | scene.AssetService.Store(AssetHelpers.CreateNotecardAsset(originalFace8TextureId)); | 145 | scene.AssetService.Store(AssetHelpers.CreateNotecardAsset(originalFace8TextureId)); |
146 | 146 | ||
147 | /* | ||
147 | afm.SetAppearance(sp, originalTe, null); | 148 | afm.SetAppearance(sp, originalTe, null); |
148 | 149 | ||
149 | INPCModule npcModule = scene.RequestModuleInterface<INPCModule>(); | 150 | INPCModule npcModule = scene.RequestModuleInterface<INPCModule>(); |
@@ -185,6 +186,7 @@ namespace OpenSim.Tests.Performance | |||
185 | endGcMemory / 1024 / 1024, | 186 | endGcMemory / 1024 / 1024, |
186 | startGcMemory / 1024 / 1024, | 187 | startGcMemory / 1024 / 1024, |
187 | (endGcMemory - startGcMemory) / 1024 / 1024); | 188 | (endGcMemory - startGcMemory) / 1024 / 1024); |
189 | */ | ||
188 | } | 190 | } |
189 | } | 191 | } |
190 | } \ No newline at end of file | 192 | } |