aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.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/CoreModules/World/WorldMap/TexturedMapTileRenderer.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 'OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs
index 97ee451..4ecad74 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs
@@ -266,7 +266,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
266 // the heigthfield might have some jumps in values. Rendered land is smooth, though, 266 // the heigthfield might have some jumps in values. Rendered land is smooth, though,
267 // as a slope is rendered at that place. So average 4 neighbour values to emulate that. 267 // as a slope is rendered at that place. So average 4 neighbour values to emulate that.
268 private float getHeight(double[,] hm, int x, int y) { 268 private float getHeight(double[,] hm, int x, int y) {
269 if (x < 255 && y < 255) 269 if (x < ((int)Constants.RegionSize - 1) && y < ((int)Constants.RegionSize - 1))
270 return (float)(hm[x, y] * .444 + (hm[x + 1, y] + hm[x, y + 1]) * .222 + hm[x + 1, y +1] * .112); 270 return (float)(hm[x, y] * .444 + (hm[x + 1, y] + hm[x, y + 1]) * .222 + hm[x + 1, y +1] * .112);
271 else 271 else
272 return (float)hm[x, y]; 272 return (float)hm[x, y];