From 824a3a114b1142325f523e2039ed070cce9ea850 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 19 May 2012 04:22:30 +0100 Subject: refactor: Add RegionConnection.PosX and PosY to return position in meters rather than copy/pasting the necessary calculations in lots of places. --- .../RegionCombinerModule/RegionConnections.cs | 37 +++++++++++++++++++--- 1 file changed, 33 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/RegionCombinerModule/RegionConnections.cs') diff --git a/OpenSim/Region/RegionCombinerModule/RegionConnections.cs b/OpenSim/Region/RegionCombinerModule/RegionConnections.cs index 3aa9f20..fba51d2 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionConnections.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionConnections.cs @@ -28,6 +28,7 @@ using System; using System.Collections.Generic; using OpenMetaverse; +using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -49,17 +50,45 @@ namespace OpenSim.Region.RegionCombinerModule /// LargeLandChannel for combined region /// public ILandChannel RegionLandChannel; + + /// + /// The x map co-ordinate for this region (where each co-ordinate is a Constants.RegionSize block). + /// public uint X; + + /// + /// The y co-ordinate for this region (where each cor-odinate is a Constants.RegionSize block). + /// public uint Y; - public int XEnd; - public int YEnd; + + /// + /// The X meters position of this connection. + /// + public uint PosX { get { return X * Constants.RegionSize; } } + + /// + /// The Y meters co-ordinate of this connection. + /// + public uint PosY { get { return Y * Constants.RegionSize; } } + + /// + /// The size of the megaregion in meters. + /// + public uint XEnd; + + /// + /// The size of the megaregion in meters. + /// + public uint YEnd; + public List ConnectedRegions; public RegionCombinerPermissionModule PermissionModule; public RegionCombinerClientEventForwarder ClientEventForwarder; + public void UpdateExtents(Vector3 extents) { - XEnd = (int)extents.X; - YEnd = (int)extents.Y; + XEnd = (uint)extents.X; + YEnd = (uint)extents.Y; } } } \ No newline at end of file -- cgit v1.1