mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 12:25:42 +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:
@@ -179,14 +179,14 @@ namespace OpenSim.Services.Interfaces
|
||||
protected IPEndPoint m_internalEndPoint;
|
||||
|
||||
/// <summary>
|
||||
/// The co-ordinate of this region.
|
||||
/// The co-ordinate of this region in region units.
|
||||
/// </summary>
|
||||
public int RegionCoordX { get { return RegionLocX / (int)Constants.RegionSize; } }
|
||||
public int RegionCoordX { get { return (int)Util.WorldToRegionLoc((uint)RegionLocX); } }
|
||||
|
||||
/// <summary>
|
||||
/// The co-ordinate of this region
|
||||
/// The co-ordinate of this region in region units
|
||||
/// </summary>
|
||||
public int RegionCoordY { get { return RegionLocY / (int)Constants.RegionSize; } }
|
||||
public int RegionCoordY { get { return (int)Util.WorldToRegionLoc((uint)RegionLocY); } }
|
||||
|
||||
/// <summary>
|
||||
/// The location of this region in meters.
|
||||
@@ -265,8 +265,8 @@ namespace OpenSim.Services.Interfaces
|
||||
|
||||
public GridRegion(uint xcell, uint ycell)
|
||||
{
|
||||
m_regionLocX = (int)(xcell * Constants.RegionSize);
|
||||
m_regionLocY = (int)(ycell * Constants.RegionSize);
|
||||
m_regionLocX = (int)Util.RegionToWorldLoc(xcell);
|
||||
m_regionLocY = (int)Util.RegionToWorldLoc(ycell);
|
||||
RegionSizeX = (int)Constants.RegionSize;
|
||||
RegionSizeY = (int)Constants.RegionSize;
|
||||
}
|
||||
@@ -274,8 +274,8 @@ namespace OpenSim.Services.Interfaces
|
||||
public GridRegion(RegionInfo ConvertFrom)
|
||||
{
|
||||
m_regionName = ConvertFrom.RegionName;
|
||||
m_regionLocX = (int)(ConvertFrom.RegionLocX * Constants.RegionSize);
|
||||
m_regionLocY = (int)(ConvertFrom.RegionLocY * Constants.RegionSize);
|
||||
m_regionLocX = (int)(ConvertFrom.WorldLocX);
|
||||
m_regionLocY = (int)(ConvertFrom.WorldLocY);
|
||||
RegionSizeX = (int)ConvertFrom.RegionSizeX;
|
||||
RegionSizeY = (int)ConvertFrom.RegionSizeY;
|
||||
m_internalEndPoint = ConvertFrom.InternalEndPoint;
|
||||
|
||||
Reference in New Issue
Block a user