aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs12
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