aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.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/MapImageModule.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/CoreModules/World/WorldMap/MapImageModule.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs
index d1d3045..5fd8369 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs
@@ -331,9 +331,9 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
331 int mapdrawendY = (int)(pos.Y + scale.Y); 331 int mapdrawendY = (int)(pos.Y + scale.Y);
332 332
333 // If object is beyond the edge of the map, don't draw it to avoid errors 333 // If object is beyond the edge of the map, don't draw it to avoid errors
334 if (mapdrawstartX < 0 || mapdrawstartX > 255 || mapdrawendX < 0 || mapdrawendX > 255 334 if (mapdrawstartX < 0 || mapdrawstartX > ((int)Constants.RegionSize - 1) || mapdrawendX < 0 || mapdrawendX > ((int)Constants.RegionSize - 1)
335 || mapdrawstartY < 0 || mapdrawstartY > 255 || mapdrawendY < 0 335 || mapdrawstartY < 0 || mapdrawstartY > ((int)Constants.RegionSize - 1) || mapdrawendY < 0
336 || mapdrawendY > 255) 336 || mapdrawendY > ((int)Constants.RegionSize - 1))
337 continue; 337 continue;
338 338
339#region obb face reconstruction part duex 339#region obb face reconstruction part duex
@@ -537,7 +537,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
537 // float z = -point3d.z - topos.z; 537 // float z = -point3d.z - topos.z;
538 538
539 returnpt.X = (int)point3d.X;//(int)((topos.x - point3d.x) / z * d); 539 returnpt.X = (int)point3d.X;//(int)((topos.x - point3d.x) / z * d);
540 returnpt.Y = (int)(255 - point3d.Y);//(int)(255 - (((topos.y - point3d.y) / z * d))); 540 returnpt.Y = (int)(((int)Constants.RegionSize - 1) - point3d.Y);//(int)(255 - (((topos.y - point3d.y) / z * d)));
541 541
542 return returnpt; 542 return returnpt;
543 } 543 }