aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorRobert Adams2013-10-02 16:57:02 -0700
committerRobert Adams2013-10-07 13:57:30 -0700
commit25ae59b9ebf71d39d2ff5237b791f2599f4fa082 (patch)
tree2a7a96da851cc236e1c5842301d08ed852c24f65 /OpenSim
parentvarregion: add new TerrainData and TerrainCompressor routines. TerrainCompres... (diff)
downloadopensim-SC_OLD-25ae59b9ebf71d39d2ff5237b791f2599f4fa082.zip
opensim-SC_OLD-25ae59b9ebf71d39d2ff5237b791f2599f4fa082.tar.gz
opensim-SC_OLD-25ae59b9ebf71d39d2ff5237b791f2599f4fa082.tar.bz2
opensim-SC_OLD-25ae59b9ebf71d39d2ff5237b791f2599f4fa082.tar.xz
varregion: remove scattered use of Constants.RegionSize by having routines reference RegionInfo.RegionWorldLoc?.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs7
5 files changed, 10 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
index 4616170..7bc5e51 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
@@ -180,8 +180,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
180 string message = c.Message; 180 string message = c.Message;
181 Scene scene = (Scene)c.Scene; 181 Scene scene = (Scene)c.Scene;
182 Vector3 fromPos = c.Position; 182 Vector3 fromPos = c.Position;
183 Vector3 regionPos = new Vector3(scene.RegionInfo.LegacyRegionLocX * Constants.RegionSize, 183 Vector3 regionPos = new Vector3(scene.RegionInfo.RegionWorldLocX, scene.RegionInfo.RegionWorldLocY, 0);
184 scene.RegionInfo.LegacyRegionLocY * Constants.RegionSize, 0);
185 184
186 if (c.Channel == DEBUG_CHANNEL) c.Type = ChatTypeEnum.DebugChannel; 185 if (c.Channel == DEBUG_CHANNEL) c.Type = ChatTypeEnum.DebugChannel;
187 186
@@ -333,8 +332,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
333 { 332 {
334 Vector3 fromRegionPos = fromPos + regionPos; 333 Vector3 fromRegionPos = fromPos + regionPos;
335 Vector3 toRegionPos = presence.AbsolutePosition + 334 Vector3 toRegionPos = presence.AbsolutePosition +
336 new Vector3(presence.Scene.RegionInfo.LegacyRegionLocX * Constants.RegionSize, 335 new Vector3(presence.Scene.RegionInfo.RegionWorldLocX, presence.Scene.RegionInfo.RegionWorldLocY, 0);
337 presence.Scene.RegionInfo.LegacyRegionLocY * Constants.RegionSize, 0);
338 336
339 int dis = (int)Util.GetDistanceTo(toRegionPos, fromRegionPos); 337 int dis = (int)Util.GetDistanceTo(toRegionPos, fromRegionPos);
340 338
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index 7c60a40..a982466 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -663,8 +663,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
663 663
664 Vector3 avaPos = p.AbsolutePosition; 664 Vector3 avaPos = p.AbsolutePosition;
665 // Getting the global position for the Avatar 665 // Getting the global position for the Avatar
666 Vector3 posGlobal = new Vector3(remoteClient.Scene.RegionInfo.LegacyRegionLocX*Constants.RegionSize + avaPos.X, 666 Vector3 posGlobal = new Vector3(remoteClient.Scene.RegionInfo.RegionWorldLocX + avaPos.X,
667 remoteClient.Scene.RegionInfo.LegacyRegionLocY*Constants.RegionSize + avaPos.Y, 667 remoteClient.Scene.RegionInfo.RegionWorldLocY + avaPos.Y,
668 avaPos.Z); 668 avaPos.Z);
669 669
670 string landOwnerName = string.Empty; 670 string landOwnerName = string.Empty;
diff --git a/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs b/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs
index 769d662..bf87392 100644
--- a/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs
@@ -213,8 +213,8 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
213 if (part != null) 213 if (part != null)
214 { 214 {
215 ObjectRegionName = s.RegionInfo.RegionName; 215 ObjectRegionName = s.RegionInfo.RegionName;
216 uint localX = (s.RegionInfo.LegacyRegionLocX * (int)Constants.RegionSize); 216 uint localX = s.RegionInfo.RegionWorldLocX;
217 uint localY = (s.RegionInfo.LegacyRegionLocY * (int)Constants.RegionSize); 217 uint localY = s.RegionInfo.RegionWorldLocY;
218 ObjectRegionName = ObjectRegionName + " (" + localX + ", " + localY + ")"; 218 ObjectRegionName = ObjectRegionName + " (" + localX + ", " + localY + ")";
219 return part; 219 return part;
220 } 220 }
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 7ef144c..297ee5f 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2094,8 +2094,8 @@ namespace OpenSim.Region.Framework.Scenes
2094// } 2094// }
2095 2095
2096 // Get terrain height for sub-region in a megaregion if necessary 2096 // Get terrain height for sub-region in a megaregion if necessary
2097 int X = (int)((m_scene.RegionInfo.LegacyRegionLocX * Constants.RegionSize) + pos.X); 2097 int X = (int)((m_scene.RegionInfo.RegionWorldLocX) + pos.X);
2098 int Y = (int)((m_scene.RegionInfo.LegacyRegionLocY * Constants.RegionSize) + pos.Y); 2098 int Y = (int)((m_scene.RegionInfo.RegionWorldLocY) + pos.Y);
2099 GridRegion target_region = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, X, Y); 2099 GridRegion target_region = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, X, Y);
2100 // If X and Y is NaN, target_region will be null 2100 // If X and Y is NaN, target_region will be null
2101 if (target_region == null) 2101 if (target_region == null)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index c9c284f..2ac0805 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4241,10 +4241,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4241 DataserverPlugin.RegisterRequest(m_host.LocalId, 4241 DataserverPlugin.RegisterRequest(m_host.LocalId,
4242 m_item.ItemID, item.AssetID.ToString()); 4242 m_item.ItemID, item.AssetID.ToString());
4243 4243
4244 Vector3 region = new Vector3( 4244 Vector3 region = new Vector3(World.RegionInfo.RegionWorldLocX, World.RegionInfo.RegionWorldLocY, 0);
4245 World.RegionInfo.LegacyRegionLocX * Constants.RegionSize,
4246 World.RegionInfo.LegacyRegionLocY * Constants.RegionSize,
4247 0);
4248 4245
4249 World.AssetService.Get(item.AssetID.ToString(), this, 4246 World.AssetService.Get(item.AssetID.ToString(), this,
4250 delegate(string i, object sender, AssetBase a) 4247 delegate(string i, object sender, AssetBase a)
@@ -5478,7 +5475,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5478 public LSL_Vector llGetRegionCorner() 5475 public LSL_Vector llGetRegionCorner()
5479 { 5476 {
5480 m_host.AddScriptLPS(1); 5477 m_host.AddScriptLPS(1);
5481 return new LSL_Vector(World.RegionInfo.LegacyRegionLocX * Constants.RegionSize, World.RegionInfo.LegacyRegionLocY * Constants.RegionSize, 0); 5478 return new LSL_Vector(World.RegionInfo.RegionWorldLocX, World.RegionInfo.RegionWorldLocY, 0);
5482 } 5479 }
5483 5480
5484 /// <summary> 5481 /// <summary>