diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/WorldMap')
3 files changed, 6 insertions, 6 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 | } |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs b/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs index f39cf68..a297cf3 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs | |||
@@ -107,7 +107,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
107 | // . | 107 | // . |
108 | // | 108 | // |
109 | // Shade the terrain for shadows | 109 | // Shade the terrain for shadows |
110 | if (x < 255 && yr < 255) | 110 | if (x < ((int)Constants.RegionSize - 1) && yr < ((int)Constants.RegionSize - 1)) |
111 | { | 111 | { |
112 | float hfvalue = (float)hm[x, y]; | 112 | float hfvalue = (float)hm[x, y]; |
113 | float hfvaluecompare = 0f; | 113 | float hfvaluecompare = 0f; |
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]; |