mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
This is the second part of the 'not crash on regionsize changes'. This lets you configure region sizes to be smaller without crashing the region. I remind you that regions are still square, must be a multiple of 4, and the Linden client doesn't like anything other then 256. If you set it bigger or smaller, the terrain doesn't load in the client, the map has issues, and god forbid you connect it to a grid that expects 256m regions.
This commit is contained in:
@@ -513,7 +513,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
||||
|
||||
public Vector3 StartPos
|
||||
{
|
||||
get { return new Vector3(128, 128, 50); }
|
||||
get { return new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 50); }
|
||||
set { }
|
||||
}
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
// Local constants
|
||||
|
||||
private static readonly Vector3 CenterOfRegion = new Vector3(128, 128, 20);
|
||||
|
||||
private static readonly Vector3 CenterOfRegion = new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 20);
|
||||
private static readonly char[] CS_SPACE = { ' ' };
|
||||
|
||||
private const int WD_INTERVAL = 1000; // base watchdog interval
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private static readonly OpenMetaverse.Vector3 CenterOfRegion = new OpenMetaverse.Vector3(128, 128, 20);
|
||||
private static readonly OpenMetaverse.Vector3 CenterOfRegion = new OpenMetaverse.Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 20);
|
||||
private const int DEBUG_CHANNEL = 2147483647;
|
||||
|
||||
private static int _idk_ = 0;
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace OpenSim.Region.CoreModules.Scripting.RegionReady
|
||||
c.Channel = m_channelNotify;
|
||||
c.Message += numScriptsFailed.ToString() + "," + message;
|
||||
c.Type = ChatTypeEnum.Region;
|
||||
c.Position = new Vector3(128, 128, 30);
|
||||
c.Position = new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 30);
|
||||
c.Sender = null;
|
||||
c.SenderUUID = UUID.Zero;
|
||||
|
||||
|
||||
@@ -755,8 +755,8 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
|
||||
position.X = s_tree.AbsolutePosition.X + (float)randX;
|
||||
position.Y = s_tree.AbsolutePosition.Y + (float)randY;
|
||||
|
||||
if (position.X <= 255 && position.X >= 0 &&
|
||||
position.Y <= 255 && position.Y >= 0 &&
|
||||
if (position.X <= ((int)Constants.RegionSize - 1) && position.X >= 0 &&
|
||||
position.Y <= ((int)Constants.RegionSize - 1) && position.Y >= 0 &&
|
||||
Util.GetDistanceTo(position, copse.m_seed_point) <= copse.m_range)
|
||||
{
|
||||
UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner;
|
||||
|
||||
Reference in New Issue
Block a user