From 317c04fe1714631d851684e3bb294f02056bcd07 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Thu, 19 Sep 2013 12:14:21 -0700 Subject: 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. --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 975bf2d..c9c284f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4242,8 +4242,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_item.ItemID, item.AssetID.ToString()); Vector3 region = new Vector3( - World.RegionInfo.RegionLocX * Constants.RegionSize, - World.RegionInfo.RegionLocY * Constants.RegionSize, + World.RegionInfo.LegacyRegionLocX * Constants.RegionSize, + World.RegionInfo.LegacyRegionLocY * Constants.RegionSize, 0); World.AssetService.Get(item.AssetID.ToString(), this, @@ -5478,7 +5478,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetRegionCorner() { m_host.AddScriptLPS(1); - return new LSL_Vector(World.RegionInfo.RegionLocX * Constants.RegionSize, World.RegionInfo.RegionLocY * Constants.RegionSize, 0); + return new LSL_Vector(World.RegionInfo.LegacyRegionLocX * Constants.RegionSize, World.RegionInfo.LegacyRegionLocY * Constants.RegionSize, 0); } /// @@ -5651,8 +5651,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api List neighbors = World.GridService.GetNeighbours(World.RegionInfo.ScopeID, World.RegionInfo.RegionID); - uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x; - uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y; + uint neighborX = World.RegionInfo.LegacyRegionLocX + (uint)dir.x; + uint neighborY = World.RegionInfo.LegacyRegionLocY + (uint)dir.y; foreach (GridRegion sri in neighbors) { @@ -10737,7 +10737,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api httpHeaders["X-SecondLife-Shard"] = shard; httpHeaders["X-SecondLife-Object-Name"] = m_host.Name; httpHeaders["X-SecondLife-Object-Key"] = m_host.UUID.ToString(); - httpHeaders["X-SecondLife-Region"] = string.Format("{0} ({1}, {2})", regionInfo.RegionName, regionInfo.RegionLocX, regionInfo.RegionLocY); + httpHeaders["X-SecondLife-Region"] = string.Format("{0} ({1}, {2})", regionInfo.RegionName, regionInfo.LegacyRegionLocX, regionInfo.LegacyRegionLocY); httpHeaders["X-SecondLife-Local-Position"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", position.X, position.Y, position.Z); httpHeaders["X-SecondLife-Local-Velocity"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", velocity.X, velocity.Y, velocity.Z); httpHeaders["X-SecondLife-Local-Rotation"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000})", rotation.X, rotation.Y, rotation.Z, rotation.W); -- cgit v1.1