aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorAdam Frisby2008-03-03 09:17:15 +0000
committerAdam Frisby2008-03-03 09:17:15 +0000
commit38568aa75f3592989f22fd7bee9a26455c82f76e (patch)
tree17a78d98342fbb8dd69be5d77536d79ad6646909 /OpenSim
parent* Removed unused directory (diff)
downloadopensim-SC_OLD-38568aa75f3592989f22fd7bee9a26455c82f76e.zip
opensim-SC_OLD-38568aa75f3592989f22fd7bee9a26455c82f76e.tar.gz
opensim-SC_OLD-38568aa75f3592989f22fd7bee9a26455c82f76e.tar.bz2
opensim-SC_OLD-38568aa75f3592989f22fd7bee9a26455c82f76e.tar.xz
* Oops, fixed.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Modules/Terrain/FileLoaders/JPEG.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Modules/Terrain/FileLoaders/JPEG.cs b/OpenSim/Region/Environment/Modules/Terrain/FileLoaders/JPEG.cs
index 57e6cd8..20e5277 100644
--- a/OpenSim/Region/Environment/Modules/Terrain/FileLoaders/JPEG.cs
+++ b/OpenSim/Region/Environment/Modules/Terrain/FileLoaders/JPEG.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain.FileLoaders
47 47
48 int pallete = gradientmapLd.Height; 48 int pallete = gradientmapLd.Height;
49 49
50 Bitmap bmp = new Bitmap(heightmap.w, heightmap.h); 50 Bitmap bmp = new Bitmap(map.Width, map.Height);
51 Color[] colours = new Color[pallete]; 51 Color[] colours = new Color[pallete];
52 52
53 for (int i = 0; i < pallete; i++) 53 for (int i = 0; i < pallete; i++)
@@ -55,9 +55,9 @@ namespace OpenSim.Region.Environment.Modules.Terrain.FileLoaders
55 colours[i] = gradientmapLd.GetPixel(0, i); 55 colours[i] = gradientmapLd.GetPixel(0, i);
56 } 56 }
57 57
58 for (int y = 0; y < copy.h; y++) 58 for (int y = 0; y < map.Height; y++)
59 { 59 {
60 for (int x = 0; x < copy.w; x++) 60 for (int x = 0; x < map.Width; x++)
61 { 61 {
62 // 512 is the largest possible height before colours clamp 62 // 512 is the largest possible height before colours clamp
63 int colorindex = (int)(Math.Max(Math.Min(1.0, map[x, y] / 512.0), 0.0) * (pallete - 1)); 63 int colorindex = (int)(Math.Max(Math.Min(1.0, map[x, y] / 512.0), 0.0) * (pallete - 1));