mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
varregion: any conversions of use of Constants.RegionSize converted into
Util.cs routines to convert region coords to and from world coords or handles.
This commit is contained in:
@@ -150,16 +150,16 @@ namespace OpenSim.Tests.Clients.GridClient
|
||||
|
||||
Console.WriteLine("[GRID CLIENT]: *** GetRegionRange (this should return 2 regions)");
|
||||
regions = m_Connector.GetRegionRange(UUID.Zero,
|
||||
900 * (int)Constants.RegionSize, 1002 * (int) Constants.RegionSize,
|
||||
900 * (int)Constants.RegionSize, 1002 * (int) Constants.RegionSize);
|
||||
(int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002),
|
||||
(int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(1002) );
|
||||
if (regions == null)
|
||||
Console.WriteLine("[GRID CLIENT]: GetRegionRange returned null");
|
||||
else
|
||||
Console.WriteLine("[GRID CLIENT]: GetRegionRange returned " + regions.Count + " regions");
|
||||
Console.WriteLine("[GRID CLIENT]: *** GetRegionRange (this should return 0 regions)");
|
||||
regions = m_Connector.GetRegionRange(UUID.Zero,
|
||||
900 * (int)Constants.RegionSize, 950 * (int)Constants.RegionSize,
|
||||
900 * (int)Constants.RegionSize, 950 * (int)Constants.RegionSize);
|
||||
(int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(950),
|
||||
(int)Util.RegionToWorldLoc(900), (int)Util.RegionToWorldLoc(950) );
|
||||
if (regions == null)
|
||||
Console.WriteLine("[GRID CLIENT]: GetRegionRange returned null");
|
||||
else
|
||||
|
||||
@@ -69,9 +69,7 @@ namespace OpenSim.Tests.Common
|
||||
tc.OnTestClientInformClientOfNeighbour += (neighbourHandle, neighbourExternalEndPoint) =>
|
||||
{
|
||||
uint x, y;
|
||||
Utils.LongToUInts(neighbourHandle, out x, out y);
|
||||
x /= Constants.RegionSize;
|
||||
y /= Constants.RegionSize;
|
||||
Util.RegionHandleToRegionLoc(neighbourHandle, out x, out y);
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[TEST CLIENT]: Processing inform client of neighbour located at {0},{1} at {2}",
|
||||
@@ -104,9 +102,7 @@ namespace OpenSim.Tests.Common
|
||||
+= (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) =>
|
||||
{
|
||||
uint x, y;
|
||||
Utils.LongToUInts(regionHandle, out x, out y);
|
||||
x /= Constants.RegionSize;
|
||||
y /= Constants.RegionSize;
|
||||
Util.RegionHandleToRegionLoc(regionHandle, out x, out y);
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[TEST CLIENT]: Processing send region teleport for destination at {0},{1} at {2}",
|
||||
@@ -125,4 +121,4 @@ namespace OpenSim.Tests.Common
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user