aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
diff options
context:
space:
mode:
authorTeravus Ovares (Dan Olivares)2009-08-07 20:31:48 -0400
committerTeravus Ovares (Dan Olivares)2009-08-07 20:31:48 -0400
commit2b990a61bfa88e13d5ad19602e6acef751ea473c (patch)
treed7cf9705923c940646e2db3af67bdb98944d9392 /OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
parent* Remove hard coded 256 limitations from various places. There's no more 2... (diff)
downloadopensim-SC_OLD-2b990a61bfa88e13d5ad19602e6acef751ea473c.zip
opensim-SC_OLD-2b990a61bfa88e13d5ad19602e6acef751ea473c.tar.gz
opensim-SC_OLD-2b990a61bfa88e13d5ad19602e6acef751ea473c.tar.bz2
opensim-SC_OLD-2b990a61bfa88e13d5ad19602e6acef751ea473c.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
index 3e9c326..d4bba10 100644
--- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
+++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
@@ -755,8 +755,8 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
755 position.X = s_tree.AbsolutePosition.X + (float)randX; 755 position.X = s_tree.AbsolutePosition.X + (float)randX;
756 position.Y = s_tree.AbsolutePosition.Y + (float)randY; 756 position.Y = s_tree.AbsolutePosition.Y + (float)randY;
757 757
758 if (position.X <= 255 && position.X >= 0 && 758 if (position.X <= ((int)Constants.RegionSize - 1) && position.X >= 0 &&
759 position.Y <= 255 && position.Y >= 0 && 759 position.Y <= ((int)Constants.RegionSize - 1) && position.Y >= 0 &&
760 Util.GetDistanceTo(position, copse.m_seed_point) <= copse.m_range) 760 Util.GetDistanceTo(position, copse.m_seed_point) <= copse.m_range)
761 { 761 {
762 UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; 762 UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner;