diff options
author | Teravus Ovares (Dan Olivares) | 2009-08-07 20:31:48 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-08-07 20:31:48 -0400 |
commit | 2b990a61bfa88e13d5ad19602e6acef751ea473c (patch) | |
tree | d7cf9705923c940646e2db3af67bdb98944d9392 /OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | |
parent | * Remove hard coded 256 limitations from various places. There's no more 2... (diff) | |
download | opensim-SC-2b990a61bfa88e13d5ad19602e6acef751ea473c.zip opensim-SC-2b990a61bfa88e13d5ad19602e6acef751ea473c.tar.gz opensim-SC-2b990a61bfa88e13d5ad19602e6acef751ea473c.tar.bz2 opensim-SC-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 'OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs')
-rw-r--r-- | OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 92d5771..d3d10bf 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | |||
@@ -144,7 +144,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin | |||
144 | } | 144 | } |
145 | else if (actor.Position.Y >= Constants.RegionSize) | 145 | else if (actor.Position.Y >= Constants.RegionSize) |
146 | { | 146 | { |
147 | actor.Position.Y = 255.9F; | 147 | actor.Position.Y = ((int)Constants.RegionSize - 0.1f); |
148 | } | 148 | } |
149 | 149 | ||
150 | if (actor.Position.X < 0) | 150 | if (actor.Position.X < 0) |
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin | |||
153 | } | 153 | } |
154 | else if (actor.Position.X >= Constants.RegionSize) | 154 | else if (actor.Position.X >= Constants.RegionSize) |
155 | { | 155 | { |
156 | actor.Position.X = 255.9F; | 156 | actor.Position.X = ((int)Constants.RegionSize - 0.1f); |
157 | } | 157 | } |
158 | 158 | ||
159 | float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + actor.Size.Z; | 159 | float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + actor.Size.Z; |