mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
VarRegion: change RegionInfo storage of region coordinates from region
count number to integer world coordinates. Added new methods RegionWorldLoc[XY]. Refactored name of 'RegionLoc*' to 'LegacyRegionLoc*' throughout OpenSim. Kept old 'RegionLoc*' entrypoint to RegionInfo for downward compatability of external region management packages.
This commit is contained in:
@@ -180,8 +180,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
||||
string message = c.Message;
|
||||
Scene scene = (Scene)c.Scene;
|
||||
Vector3 fromPos = c.Position;
|
||||
Vector3 regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
|
||||
scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
|
||||
Vector3 regionPos = new Vector3(scene.RegionInfo.LegacyRegionLocX * Constants.RegionSize,
|
||||
scene.RegionInfo.LegacyRegionLocY * Constants.RegionSize, 0);
|
||||
|
||||
if (c.Channel == DEBUG_CHANNEL) c.Type = ChatTypeEnum.DebugChannel;
|
||||
|
||||
@@ -333,8 +333,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
||||
{
|
||||
Vector3 fromRegionPos = fromPos + regionPos;
|
||||
Vector3 toRegionPos = presence.AbsolutePosition +
|
||||
new Vector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize,
|
||||
presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
|
||||
new Vector3(presence.Scene.RegionInfo.LegacyRegionLocX * Constants.RegionSize,
|
||||
presence.Scene.RegionInfo.LegacyRegionLocY * Constants.RegionSize, 0);
|
||||
|
||||
int dis = (int)Util.GetDistanceTo(toRegionPos, fromRegionPos);
|
||||
|
||||
|
||||
@@ -663,8 +663,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
|
||||
|
||||
Vector3 avaPos = p.AbsolutePosition;
|
||||
// Getting the global position for the Avatar
|
||||
Vector3 posGlobal = new Vector3(remoteClient.Scene.RegionInfo.RegionLocX*Constants.RegionSize + avaPos.X,
|
||||
remoteClient.Scene.RegionInfo.RegionLocY*Constants.RegionSize + avaPos.Y,
|
||||
Vector3 posGlobal = new Vector3(remoteClient.Scene.RegionInfo.LegacyRegionLocX*Constants.RegionSize + avaPos.X,
|
||||
remoteClient.Scene.RegionInfo.LegacyRegionLocY*Constants.RegionSize + avaPos.Y,
|
||||
avaPos.Z);
|
||||
|
||||
string landOwnerName = string.Empty;
|
||||
|
||||
@@ -494,8 +494,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
}
|
||||
|
||||
// Check that these are not the same coordinates
|
||||
if (finalDestination.RegionLocX == sp.Scene.RegionInfo.RegionLocX &&
|
||||
finalDestination.RegionLocY == sp.Scene.RegionInfo.RegionLocY)
|
||||
if (finalDestination.RegionLocX == sp.Scene.RegionInfo.LegacyRegionLocX &&
|
||||
finalDestination.RegionLocY == sp.Scene.RegionInfo.LegacyRegionLocY)
|
||||
{
|
||||
// Can't do. Viewer crashes
|
||||
sp.ControllingClient.SendTeleportFailed("Space warp! You would crash. Move to a different region and try again.");
|
||||
@@ -567,8 +567,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
// destRegionX, destRegionY, finalDestination.RegionID, finalDestination.ServerURI);
|
||||
|
||||
// Insanely, RegionLoc on RegionInfo is the 256m map co-ord whilst GridRegion.RegionLoc is the raw meters position.
|
||||
return Math.Abs(sourceRegion.RegionLocX - destRegion.RegionCoordX) <= MaxTransferDistance
|
||||
&& Math.Abs(sourceRegion.RegionLocY - destRegion.RegionCoordY) <= MaxTransferDistance;
|
||||
return Math.Abs(sourceRegion.LegacyRegionLocX - destRegion.RegionCoordX) <= MaxTransferDistance
|
||||
&& Math.Abs(sourceRegion.LegacyRegionLocY - destRegion.RegionCoordY) <= MaxTransferDistance;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -635,7 +635,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
string.Format(
|
||||
"Can't teleport to {0} ({1},{2}) from {3} ({4},{5}), destination is more than {6} regions way",
|
||||
finalDestination.RegionName, finalDestination.RegionCoordX, finalDestination.RegionCoordY,
|
||||
sourceRegion.RegionName, sourceRegion.RegionLocX, sourceRegion.RegionLocY,
|
||||
sourceRegion.RegionName, sourceRegion.LegacyRegionLocX, sourceRegion.LegacyRegionLocY,
|
||||
MaxTransferDistance));
|
||||
|
||||
return;
|
||||
@@ -1374,8 +1374,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
// "[ENTITY TRANSFER MODULE]: Crossing agent {0} at pos {1} in {2}", agent.Name, pos, scene.Name);
|
||||
|
||||
Vector3 newpos = new Vector3(pos.X, pos.Y, pos.Z);
|
||||
uint neighbourx = scene.RegionInfo.RegionLocX;
|
||||
uint neighboury = scene.RegionInfo.RegionLocY;
|
||||
uint neighbourx = scene.RegionInfo.LegacyRegionLocX;
|
||||
uint neighboury = scene.RegionInfo.LegacyRegionLocY;
|
||||
const float boundaryDistance = 1.7f;
|
||||
Vector3 northCross = new Vector3(0, boundaryDistance, 0);
|
||||
Vector3 southCross = new Vector3(0, -1 * boundaryDistance, 0);
|
||||
@@ -1408,8 +1408,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
neighbourx = b.TriggerRegionX;
|
||||
|
||||
Vector3 newposition = pos;
|
||||
newposition.X += (scene.RegionInfo.RegionLocX - neighbourx) * Constants.RegionSize;
|
||||
newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize;
|
||||
newposition.X += (scene.RegionInfo.LegacyRegionLocX - neighbourx) * Constants.RegionSize;
|
||||
newposition.Y += (scene.RegionInfo.LegacyRegionLocY - neighboury) * Constants.RegionSize;
|
||||
agent.ControllingClient.SendAgentAlertMessage(
|
||||
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
|
||||
InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
|
||||
@@ -1431,8 +1431,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
neighbourx = ba.TriggerRegionX;
|
||||
|
||||
Vector3 newposition = pos;
|
||||
newposition.X += (scene.RegionInfo.RegionLocX - neighbourx) * Constants.RegionSize;
|
||||
newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize;
|
||||
newposition.X += (scene.RegionInfo.LegacyRegionLocX - neighbourx) * Constants.RegionSize;
|
||||
newposition.Y += (scene.RegionInfo.LegacyRegionLocY - neighboury) * Constants.RegionSize;
|
||||
agent.ControllingClient.SendAgentAlertMessage(
|
||||
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
|
||||
InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
|
||||
@@ -1462,8 +1462,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
neighboury = ba.TriggerRegionY;
|
||||
neighbourx = ba.TriggerRegionX;
|
||||
Vector3 newposition = pos;
|
||||
newposition.X += (scene.RegionInfo.RegionLocX - neighbourx) * Constants.RegionSize;
|
||||
newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize;
|
||||
newposition.X += (scene.RegionInfo.LegacyRegionLocX - neighbourx) * Constants.RegionSize;
|
||||
newposition.Y += (scene.RegionInfo.LegacyRegionLocY - neighboury) * Constants.RegionSize;
|
||||
agent.ControllingClient.SendAgentAlertMessage(
|
||||
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
|
||||
InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
|
||||
@@ -1492,8 +1492,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
neighboury = b.TriggerRegionY;
|
||||
neighbourx = b.TriggerRegionX;
|
||||
Vector3 newposition = pos;
|
||||
newposition.X += (scene.RegionInfo.RegionLocX - neighbourx) * Constants.RegionSize;
|
||||
newposition.Y += (scene.RegionInfo.RegionLocY - neighboury) * Constants.RegionSize;
|
||||
newposition.X += (scene.RegionInfo.LegacyRegionLocX - neighbourx) * Constants.RegionSize;
|
||||
newposition.Y += (scene.RegionInfo.LegacyRegionLocY - neighboury) * Constants.RegionSize;
|
||||
agent.ControllingClient.SendAgentAlertMessage(
|
||||
String.Format("Moving you to region {0},{1}", neighbourx, neighboury), false);
|
||||
InformClientToInitiateTeleportToLocation(agent, neighbourx, neighboury, newposition, scene);
|
||||
@@ -1901,7 +1901,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
|
||||
if (m_regionInfo != null)
|
||||
{
|
||||
neighbours = RequestNeighbours(sp, m_regionInfo.RegionLocX, m_regionInfo.RegionLocY);
|
||||
neighbours = RequestNeighbours(sp, m_regionInfo.LegacyRegionLocX, m_regionInfo.LegacyRegionLocY);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2057,8 +2057,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
|
||||
Vector3 CalculateOffset(ScenePresence sp, GridRegion neighbour)
|
||||
{
|
||||
int rRegionX = (int)sp.Scene.RegionInfo.RegionLocX;
|
||||
int rRegionY = (int)sp.Scene.RegionInfo.RegionLocY;
|
||||
int rRegionX = (int)sp.Scene.RegionInfo.LegacyRegionLocX;
|
||||
int rRegionY = (int)sp.Scene.RegionInfo.LegacyRegionLocY;
|
||||
int tRegionX = neighbour.RegionLocX / (int)Constants.RegionSize;
|
||||
int tRegionY = neighbour.RegionLocY / (int)Constants.RegionSize;
|
||||
int shiftx = (rRegionX - tRegionX) * (int)Constants.RegionSize;
|
||||
@@ -2161,10 +2161,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
extent.X = ((int)extent.X / (int)Constants.RegionSize);
|
||||
extent.Y = ((int)extent.Y / (int)Constants.RegionSize);
|
||||
|
||||
swCorner.X = Scene.RegionInfo.RegionLocX - 1;
|
||||
swCorner.Y = Scene.RegionInfo.RegionLocY - 1;
|
||||
neCorner.X = Scene.RegionInfo.RegionLocX + extent.X;
|
||||
neCorner.Y = Scene.RegionInfo.RegionLocY + extent.Y;
|
||||
swCorner.X = Scene.RegionInfo.LegacyRegionLocX - 1;
|
||||
swCorner.Y = Scene.RegionInfo.LegacyRegionLocY - 1;
|
||||
neCorner.X = Scene.RegionInfo.LegacyRegionLocX + extent.X;
|
||||
neCorner.Y = Scene.RegionInfo.LegacyRegionLocY + extent.Y;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2301,8 +2301,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
return;
|
||||
}
|
||||
|
||||
int thisx = (int)scene.RegionInfo.RegionLocX;
|
||||
int thisy = (int)scene.RegionInfo.RegionLocY;
|
||||
int thisx = (int)scene.RegionInfo.LegacyRegionLocX;
|
||||
int thisy = (int)scene.RegionInfo.LegacyRegionLocY;
|
||||
Vector3 EastCross = new Vector3(0.1f, 0, 0);
|
||||
Vector3 WestCross = new Vector3(-0.1f, 0, 0);
|
||||
Vector3 NorthCross = new Vector3(0, 0.1f, 0);
|
||||
|
||||
@@ -213,8 +213,8 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
|
||||
if (part != null)
|
||||
{
|
||||
ObjectRegionName = s.RegionInfo.RegionName;
|
||||
uint localX = (s.RegionInfo.RegionLocX * (int)Constants.RegionSize);
|
||||
uint localY = (s.RegionInfo.RegionLocY * (int)Constants.RegionSize);
|
||||
uint localX = (s.RegionInfo.LegacyRegionLocX * (int)Constants.RegionSize);
|
||||
uint localY = (s.RegionInfo.LegacyRegionLocY * (int)Constants.RegionSize);
|
||||
ObjectRegionName = ObjectRegionName + " (" + localX + ", " + localY + ")";
|
||||
return part;
|
||||
}
|
||||
|
||||
@@ -224,10 +224,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
|
||||
}
|
||||
|
||||
string reason = string.Empty;
|
||||
if (!m_MapService.AddMapTile((int)scene.RegionInfo.RegionLocX, (int)scene.RegionInfo.RegionLocY, jpgData, out reason))
|
||||
if (!m_MapService.AddMapTile((int)scene.RegionInfo.LegacyRegionLocX, (int)scene.RegionInfo.LegacyRegionLocY, jpgData, out reason))
|
||||
{
|
||||
m_log.DebugFormat("[MAP IMAGE SERVICE MODULE]: Unable to upload tile image for {0} at {1}-{2}: {3}",
|
||||
scene.RegionInfo.RegionName, scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY, reason);
|
||||
scene.RegionInfo.RegionName, scene.RegionInfo.LegacyRegionLocX, scene.RegionInfo.LegacyRegionLocY, reason);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,8 +71,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
|
||||
public void AddScene(Scene scene)
|
||||
{
|
||||
uint x = scene.RegionInfo.RegionLocX;
|
||||
uint y = scene.RegionInfo.RegionLocY;
|
||||
uint x = scene.RegionInfo.LegacyRegionLocX;
|
||||
uint y = scene.RegionInfo.LegacyRegionLocY;
|
||||
|
||||
SortedDictionary<uint, Scene> row;
|
||||
if (!Regions.TryGetValue(y, out row))
|
||||
@@ -120,8 +120,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
{
|
||||
// We add the region's coordinates to ensure uniqueness even if multiple regions have the same name
|
||||
string path = string.Format("{0}_{1}_{2}",
|
||||
scene.RegionInfo.RegionLocX - Rect.X + 1,
|
||||
scene.RegionInfo.RegionLocY - Rect.Y + 1,
|
||||
scene.RegionInfo.LegacyRegionLocX - Rect.X + 1,
|
||||
scene.RegionInfo.LegacyRegionLocY - Rect.Y + 1,
|
||||
scene.RegionInfo.RegionName.Replace(' ', '_'));
|
||||
m_regionDirs[scene.RegionInfo.RegionID] = path;
|
||||
});
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
{
|
||||
foreach (RegionInfo archivedRegion in m_directory2region.Values)
|
||||
{
|
||||
Point location = new Point((int)rootScene.RegionInfo.RegionLocX, (int)rootScene.RegionInfo.RegionLocY);
|
||||
Point location = new Point((int)rootScene.RegionInfo.LegacyRegionLocX, (int)rootScene.RegionInfo.LegacyRegionLocY);
|
||||
location.Offset(archivedRegion.Location);
|
||||
|
||||
Scene scene;
|
||||
|
||||
@@ -96,9 +96,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||
int x = (args.Length > 5 ? int.Parse(args[5]) : -1);
|
||||
int y = (args.Length > 6 ? int.Parse(args[6]) : -1);
|
||||
|
||||
if (x == -1 || m_module.Scene.RegionInfo.RegionLocX == x)
|
||||
if (x == -1 || m_module.Scene.RegionInfo.LegacyRegionLocX == x)
|
||||
{
|
||||
if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y)
|
||||
if (y == -1 || m_module.Scene.RegionInfo.LegacyRegionLocY == y)
|
||||
{
|
||||
int corner = int.Parse(num);
|
||||
UUID texture = UUID.Parse(uuid);
|
||||
@@ -135,9 +135,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||
int x = (args.Length > 4 ? int.Parse(args[4]) : -1);
|
||||
int y = (args.Length > 5 ? int.Parse(args[5]) : -1);
|
||||
|
||||
if (x == -1 || m_module.Scene.RegionInfo.RegionLocX == x)
|
||||
if (x == -1 || m_module.Scene.RegionInfo.LegacyRegionLocX == x)
|
||||
{
|
||||
if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y)
|
||||
if (y == -1 || m_module.Scene.RegionInfo.LegacyRegionLocY == y)
|
||||
{
|
||||
double selectedheight = double.Parse(heightstring);
|
||||
|
||||
@@ -159,9 +159,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||
int x = (args.Length > 6 ? int.Parse(args[6]) : -1);
|
||||
int y = (args.Length > 7 ? int.Parse(args[7]) : -1);
|
||||
|
||||
if (x == -1 || m_module.Scene.RegionInfo.RegionLocX == x)
|
||||
if (x == -1 || m_module.Scene.RegionInfo.LegacyRegionLocX == x)
|
||||
{
|
||||
if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y)
|
||||
if (y == -1 || m_module.Scene.RegionInfo.LegacyRegionLocY == y)
|
||||
{
|
||||
int corner = int.Parse(num);
|
||||
float lowValue = float.Parse(min, Culture.NumberFormatInfo);
|
||||
|
||||
@@ -1717,8 +1717,8 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
// HACK for now
|
||||
RegionInfo r = new RegionInfo();
|
||||
r.RegionName = info.RegionName;
|
||||
r.RegionLocX = (uint)info.RegionLocX;
|
||||
r.RegionLocY = (uint)info.RegionLocY;
|
||||
r.LegacyRegionLocX = (uint)info.RegionLocX;
|
||||
r.LegacyRegionLocY = (uint)info.RegionLocY;
|
||||
r.RegionSettings.Maturity = (int)Util.ConvertAccessLevelToMaturity(data.RegionAccess);
|
||||
remoteClient.SendParcelInfo(r, data.LandData, parcelID, data.X, data.Y);
|
||||
}
|
||||
|
||||
@@ -553,8 +553,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||
/// <param name="fileStartY">Where to begin our slice</param>
|
||||
public void LoadFromFile(string filename, int fileWidth, int fileHeight, int fileStartX, int fileStartY)
|
||||
{
|
||||
int offsetX = (int) m_scene.RegionInfo.RegionLocX - fileStartX;
|
||||
int offsetY = (int) m_scene.RegionInfo.RegionLocY - fileStartY;
|
||||
int offsetX = (int) m_scene.RegionInfo.LegacyRegionLocX - fileStartX;
|
||||
int offsetY = (int) m_scene.RegionInfo.LegacyRegionLocY - fileStartY;
|
||||
|
||||
if (offsetX >= 0 && offsetX < fileWidth && offsetY >= 0 && offsetY < fileHeight)
|
||||
{
|
||||
@@ -594,14 +594,14 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||
/// <param name="fileStartY">The may y co-ordinate at which to begin the save.</param>
|
||||
public void SaveToFile(string filename, int fileWidth, int fileHeight, int fileStartX, int fileStartY)
|
||||
{
|
||||
int offsetX = (int)m_scene.RegionInfo.RegionLocX - fileStartX;
|
||||
int offsetY = (int)m_scene.RegionInfo.RegionLocY - fileStartY;
|
||||
int offsetX = (int)m_scene.RegionInfo.LegacyRegionLocX - fileStartX;
|
||||
int offsetY = (int)m_scene.RegionInfo.LegacyRegionLocY - fileStartY;
|
||||
|
||||
if (offsetX < 0 || offsetX >= fileWidth || offsetY < 0 || offsetY >= fileHeight)
|
||||
{
|
||||
MainConsole.Instance.OutputFormat(
|
||||
"ERROR: file width + minimum X tile and file height + minimum Y tile must incorporate the current region at ({0},{1}). File width {2} from {3} and file height {4} from {5} does not.",
|
||||
m_scene.RegionInfo.RegionLocX, m_scene.RegionInfo.RegionLocY, fileWidth, fileStartX, fileHeight, fileStartY);
|
||||
m_scene.RegionInfo.LegacyRegionLocX, m_scene.RegionInfo.LegacyRegionLocY, fileWidth, fileStartX, fileHeight, fileStartY);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
// 6/8/2011 -- I'm adding an explicit 2048 check, so that we never forget that there is
|
||||
// a hack here, and so that regions below 4096 don't get spammed with unnecessary map blocks.
|
||||
|
||||
if (m_scene.RegionInfo.RegionLocX >= 2048 || m_scene.RegionInfo.RegionLocY >= 2048)
|
||||
if (m_scene.RegionInfo.LegacyRegionLocX >= 2048 || m_scene.RegionInfo.LegacyRegionLocY >= 2048)
|
||||
{
|
||||
ScenePresence avatarPresence = null;
|
||||
|
||||
@@ -269,10 +269,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
List<MapBlockData> mapBlocks = new List<MapBlockData>(); ;
|
||||
|
||||
List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
|
||||
(int)(m_scene.RegionInfo.RegionLocX - 8) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.RegionLocX + 8) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.RegionLocY - 8) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.RegionLocY + 8) * (int)Constants.RegionSize);
|
||||
(int)(m_scene.RegionInfo.LegacyRegionLocX - 8) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.LegacyRegionLocX + 8) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.LegacyRegionLocY - 8) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.LegacyRegionLocY + 8) * (int)Constants.RegionSize);
|
||||
foreach (GridRegion r in regions)
|
||||
{
|
||||
MapBlockData block = new MapBlockData();
|
||||
@@ -1199,10 +1199,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
|
||||
List<MapBlockData> mapBlocks = new List<MapBlockData>();
|
||||
List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
|
||||
(int)(m_scene.RegionInfo.RegionLocX - 9) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.RegionLocX + 9) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.RegionLocY - 9) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.RegionLocY + 9) * (int)Constants.RegionSize);
|
||||
(int)(m_scene.RegionInfo.LegacyRegionLocX - 9) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.LegacyRegionLocX + 9) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.LegacyRegionLocY - 9) * (int)Constants.RegionSize,
|
||||
(int)(m_scene.RegionInfo.LegacyRegionLocY + 9) * (int)Constants.RegionSize);
|
||||
List<AssetBase> textures = new List<AssetBase>();
|
||||
List<Image> bitImages = new List<Image>();
|
||||
|
||||
@@ -1243,8 +1243,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
|
||||
for (int i = 0; i < mapBlocks.Count; i++)
|
||||
{
|
||||
ushort x = (ushort)((mapBlocks[i].X - m_scene.RegionInfo.RegionLocX) + 10);
|
||||
ushort y = (ushort)((mapBlocks[i].Y - m_scene.RegionInfo.RegionLocY) + 10);
|
||||
ushort x = (ushort)((mapBlocks[i].X - m_scene.RegionInfo.LegacyRegionLocX) + 10);
|
||||
ushort y = (ushort)((mapBlocks[i].Y - m_scene.RegionInfo.LegacyRegionLocY) + 10);
|
||||
g.DrawImage(bitImages[i], (x * 128), 2560 - (y * 128), 128, 128); // y origin is top
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user