diff options
author | Robert Adams | 2015-03-29 14:25:12 -0700 |
---|---|---|
committer | Robert Adams | 2015-03-29 14:25:12 -0700 |
commit | 07dead7dcb8b0f2a27a50748e4a460d9669903fc (patch) | |
tree | b61c3d892e83d36fece40e7735c5d97e64b9020f /OpenSim/Region/OptionalModules | |
parent | varregion: add varregion and TerrainData use in LLClientView. (diff) | |
download | opensim-SC-07dead7dcb8b0f2a27a50748e4a460d9669903fc.zip opensim-SC-07dead7dcb8b0f2a27a50748e4a460d9669903fc.tar.gz opensim-SC-07dead7dcb8b0f2a27a50748e4a460d9669903fc.tar.bz2 opensim-SC-07dead7dcb8b0f2a27a50748e4a460d9669903fc.tar.xz |
varregion: any conversions of use of Constants.RegionSize converted into
Util.cs routines to convert region coords to and from world coords or handles.
Diffstat (limited to '')
6 files changed, 13 insertions, 6 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index ed1503c..3750494 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -518,7 +518,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
518 | 518 | ||
519 | public Vector3 StartPos | 519 | public Vector3 StartPos |
520 | { | 520 | { |
521 | get { return new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 50); } | 521 | get { return new Vector3(m_scene.RegionInfo.RegionSizeX * 0.5f, m_scene.RegionInfo.RegionSizeY * 0.5f, 50f); } |
522 | set { } | 522 | set { } |
523 | } | 523 | } |
524 | 524 | ||
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs index c5cba8e..f5bd44d 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs | |||
@@ -52,6 +52,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
52 | 52 | ||
53 | // Local constants | 53 | // Local constants |
54 | 54 | ||
55 | // This computation is not the real region center if the region is larger than 256. | ||
56 | // This computation isn't fixed because there is not a handle back to the region. | ||
55 | private static readonly Vector3 CenterOfRegion = new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 20); | 57 | private static readonly Vector3 CenterOfRegion = new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 20); |
56 | private static readonly char[] CS_SPACE = { ' ' }; | 58 | private static readonly char[] CS_SPACE = { ' ' }; |
57 | 59 | ||
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs index d4fe5e0..5505001 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs | |||
@@ -44,6 +44,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
44 | private static readonly ILog m_log = | 44 | private static readonly ILog m_log = |
45 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | // This computation is not the real region center if the region is larger than 256. | ||
48 | // This computation isn't fixed because there is not a handle back to the region. | ||
47 | private static readonly OpenMetaverse.Vector3 CenterOfRegion = new OpenMetaverse.Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 20); | 49 | private static readonly OpenMetaverse.Vector3 CenterOfRegion = new OpenMetaverse.Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 20); |
48 | private const int DEBUG_CHANNEL = 2147483647; | 50 | private const int DEBUG_CHANNEL = 2147483647; |
49 | 51 | ||
diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs index a375da9..0bf23f1 100644 --- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs +++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs | |||
@@ -122,8 +122,8 @@ namespace OpenSim.Region.OptionalModules | |||
122 | 122 | ||
123 | private bool CanObjectEnter(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene) | 123 | private bool CanObjectEnter(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene) |
124 | { | 124 | { |
125 | if (newPoint.X < -1f || newPoint.X > (float)(Constants.RegionSize + 1) || | 125 | if (newPoint.X < -1f || newPoint.X > (scene.RegionInfo.RegionSizeX + 1) || |
126 | newPoint.Y < -1f || newPoint.Y > (float)(Constants.RegionSize + 1)) | 126 | newPoint.Y < -1f || newPoint.Y > (scene.RegionInfo.RegionSizeY) ) |
127 | return true; | 127 | return true; |
128 | 128 | ||
129 | SceneObjectPart obj = scene.GetSceneObjectPart(objectID); | 129 | SceneObjectPart obj = scene.GetSceneObjectPart(objectID); |
diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs index eb386fe..296ab87 100644 --- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs | |||
@@ -170,7 +170,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady | |||
170 | c.Channel = m_channelNotify; | 170 | c.Channel = m_channelNotify; |
171 | c.Message += numScriptsFailed.ToString() + "," + message; | 171 | c.Message += numScriptsFailed.ToString() + "," + message; |
172 | c.Type = ChatTypeEnum.Region; | 172 | c.Type = ChatTypeEnum.Region; |
173 | c.Position = new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 30); | 173 | if (m_scene != null) |
174 | c.Position = new Vector3((m_scene.RegionInfo.RegionSizeX * 0.5f), (m_scene.RegionInfo.RegionSizeY * 0.5f), 30); | ||
175 | else | ||
176 | c.Position = new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 30); | ||
174 | c.Sender = null; | 177 | c.Sender = null; |
175 | c.SenderUUID = UUID.Zero; | 178 | c.SenderUUID = UUID.Zero; |
176 | c.Scene = m_scene; | 179 | c.Scene = m_scene; |
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index 8144870..e4a3382 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs | |||
@@ -748,8 +748,8 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
748 | position.X = s_tree.AbsolutePosition.X + (float)randX; | 748 | position.X = s_tree.AbsolutePosition.X + (float)randX; |
749 | position.Y = s_tree.AbsolutePosition.Y + (float)randY; | 749 | position.Y = s_tree.AbsolutePosition.Y + (float)randY; |
750 | 750 | ||
751 | if (position.X <= ((int)Constants.RegionSize - 1) && position.X >= 0 && | 751 | if (position.X <= (m_scene.RegionInfo.RegionSizeX - 1) && position.X >= 0 && |
752 | position.Y <= ((int)Constants.RegionSize - 1) && position.Y >= 0 && | 752 | position.Y <= (m_scene.RegionInfo.RegionSizeY - 1) && position.Y >= 0 && |
753 | Util.GetDistanceTo(position, copse.m_seed_point) <= copse.m_range) | 753 | Util.GetDistanceTo(position, copse.m_seed_point) <= copse.m_range) |
754 | { | 754 | { |
755 | UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; | 755 | UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; |