diff options
author | Adam Frisby | 2007-08-01 22:45:05 +0000 |
---|---|---|
committer | Adam Frisby | 2007-08-01 22:45:05 +0000 |
commit | 04d40b71d4e1e589ca05e0810a0d7972f62262b1 (patch) | |
tree | b0fee75d10d4fba6a1805450aff70d3a310213e9 /OpenSim/Region/Terrain.BasicTerrain | |
parent | * Added load-tile terrain command to correspond with previous commit. (diff) | |
download | opensim-SC-04d40b71d4e1e589ca05e0810a0d7972f62262b1.zip opensim-SC-04d40b71d4e1e589ca05e0810a0d7972f62262b1.tar.gz opensim-SC-04d40b71d4e1e589ca05e0810a0d7972f62262b1.tar.bz2 opensim-SC-04d40b71d4e1e589ca05e0810a0d7972f62262b1.tar.xz |
* Fixed an assorted group of bugs with tiled terrain import.
Diffstat (limited to 'OpenSim/Region/Terrain.BasicTerrain')
-rw-r--r-- | OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs index 74e44ec..4ecdfdf 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs | |||
@@ -346,7 +346,7 @@ namespace OpenSim.Region.Terrain | |||
346 | break; | 346 | break; |
347 | 347 | ||
348 | case "load": | 348 | case "load": |
349 | args[2].Replace("%name%", simName); | 349 | args[3].Replace("%name%", simName); |
350 | switch (args[1].ToLower()) | 350 | switch (args[1].ToLower()) |
351 | { | 351 | { |
352 | case "f32": | 352 | case "f32": |
@@ -363,7 +363,7 @@ namespace OpenSim.Region.Terrain | |||
363 | 363 | ||
364 | case "img": | 364 | case "img": |
365 | heightmap.LoadImage(args[2]); | 365 | heightmap.LoadImage(args[2]); |
366 | return false; | 366 | break; |
367 | 367 | ||
368 | default: | 368 | default: |
369 | resultText = "Unknown image or data format"; | 369 | resultText = "Unknown image or data format"; |
@@ -385,7 +385,7 @@ namespace OpenSim.Region.Terrain | |||
385 | break; | 385 | break; |
386 | 386 | ||
387 | case "save": | 387 | case "save": |
388 | args[2].Replace("%name%", simName); | 388 | args[3].Replace("%name%", simName); |
389 | switch (args[1].ToLower()) | 389 | switch (args[1].ToLower()) |
390 | { | 390 | { |
391 | case "f32": | 391 | case "f32": |
@@ -603,7 +603,7 @@ namespace OpenSim.Region.Terrain | |||
603 | int sectionToLoadX = ((this.offsetX - lowerboundX) * this.w); | 603 | int sectionToLoadX = ((this.offsetX - lowerboundX) * this.w); |
604 | int sectionToLoadY = ((this.offsetY - lowerboundY) * this.h); | 604 | int sectionToLoadY = ((this.offsetY - lowerboundY) * this.h); |
605 | 605 | ||
606 | double[,] tempMap = new double[dimensionX, dimensionY]; | 606 | double[,] tempMap = new double[dimensionY, dimensionX]; |
607 | 607 | ||
608 | FileInfo file = new FileInfo(filename); | 608 | FileInfo file = new FileInfo(filename); |
609 | FileStream s = file.Open(FileMode.Open, FileAccess.Read); | 609 | FileStream s = file.Open(FileMode.Open, FileAccess.Read); |
@@ -614,7 +614,7 @@ namespace OpenSim.Region.Terrain | |||
614 | { | 614 | { |
615 | for (y = 0; y < dimensionY; y++) | 615 | for (y = 0; y < dimensionY; y++) |
616 | { | 616 | { |
617 | tempMap[x,y] = (double)bs.ReadSingle(); | 617 | tempMap[y,x] = (double)bs.ReadSingle(); |
618 | } | 618 | } |
619 | } | 619 | } |
620 | 620 | ||
@@ -622,7 +622,7 @@ namespace OpenSim.Region.Terrain | |||
622 | { | 622 | { |
623 | for (y = 0; y < h; y++) | 623 | for (y = 0; y < h; y++) |
624 | { | 624 | { |
625 | heightmap.Set(x, y, tempMap[x + sectionToLoadX, y + sectionToLoadY]); | 625 | heightmap.Set(x, y, tempMap[x + sectionToLoadY, y + sectionToLoadX]); |
626 | } | 626 | } |
627 | } | 627 | } |
628 | 628 | ||