diff options
author | Robert Adams | 2015-03-29 14:25:12 -0700 |
---|---|---|
committer | Robert Adams | 2015-03-29 14:25:12 -0700 |
commit | 07dead7dcb8b0f2a27a50748e4a460d9669903fc (patch) | |
tree | b61c3d892e83d36fece40e7735c5d97e64b9020f /OpenSim/Tests | |
parent | varregion: add varregion and TerrainData use in LLClientView. (diff) | |
download | opensim-SC-07dead7dcb8b0f2a27a50748e4a460d9669903fc.zip opensim-SC-07dead7dcb8b0f2a27a50748e4a460d9669903fc.tar.gz opensim-SC-07dead7dcb8b0f2a27a50748e4a460d9669903fc.tar.bz2 opensim-SC-07dead7dcb8b0f2a27a50748e4a460d9669903fc.tar.xz |
varregion: any conversions of use of Constants.RegionSize converted into
Util.cs routines to convert region coords to and from world coords or handles.
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 |
2 files changed, 7 insertions, 11 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 | } |