diff options
author | Adam Frisby | 2007-08-02 20:25:28 +0000 |
---|---|---|
committer | Adam Frisby | 2007-08-02 20:25:28 +0000 |
commit | ed0704d527acdfa4642fa9574a7a4bcfecdec1fa (patch) | |
tree | 75bdf336d238f293850ba3286cce203ebf3aae74 /OpenSim | |
parent | * Added new "terrain add" command. (diff) | |
download | opensim-SC-ed0704d527acdfa4642fa9574a7a4bcfecdec1fa.zip opensim-SC-ed0704d527acdfa4642fa9574a7a4bcfecdec1fa.tar.gz opensim-SC-ed0704d527acdfa4642fa9574a7a4bcfecdec1fa.tar.bz2 opensim-SC-ed0704d527acdfa4642fa9574a7a4bcfecdec1fa.tar.xz |
* Fixed several issues with Terrain
* RAW/HiRAW export modes now work again
* Filename variables (such as %x%) now work correctly when loading or saving multiple tiles.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs index 7130e4b..09e6335 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs | |||
@@ -103,6 +103,8 @@ namespace OpenSim.Region.Terrain | |||
103 | h = 256; | 103 | h = 256; |
104 | heightmap = new Channel(w, h); | 104 | heightmap = new Channel(w, h); |
105 | revertmap = new Channel(w, h); | 105 | revertmap = new Channel(w, h); |
106 | watermap = new Channel(w, h); | ||
107 | watermap.Fill(20); | ||
106 | 108 | ||
107 | offsetX = X; | 109 | offsetX = X; |
108 | offsetY = Y; | 110 | offsetY = Y; |
@@ -363,7 +365,7 @@ namespace OpenSim.Region.Terrain | |||
363 | break; | 365 | break; |
364 | 366 | ||
365 | case "load": | 367 | case "load": |
366 | args[3].Replace("%name%", simName); | 368 | args[2].Replace("%name%", simName); |
367 | switch (args[1].ToLower()) | 369 | switch (args[1].ToLower()) |
368 | { | 370 | { |
369 | case "f32": | 371 | case "f32": |
@@ -402,31 +404,34 @@ namespace OpenSim.Region.Terrain | |||
402 | break; | 404 | break; |
403 | 405 | ||
404 | case "save": | 406 | case "save": |
405 | args[3].Replace("%name%", simName); | 407 | string filename = args[2].Replace("%name%", simName); |
408 | filename = filename.Replace("%x%", this.offsetX.ToString()); | ||
409 | filename = filename.Replace("%y%", this.offsetY.ToString()); | ||
410 | |||
406 | switch (args[1].ToLower()) | 411 | switch (args[1].ToLower()) |
407 | { | 412 | { |
408 | case "f32": | 413 | case "f32": |
409 | WriteToFileF32(args[2]); | 414 | WriteToFileF32(filename); |
410 | break; | 415 | break; |
411 | 416 | ||
412 | case "f64": | 417 | case "f64": |
413 | WriteToFileF64(args[2]); | 418 | WriteToFileF64(filename); |
414 | break; | 419 | break; |
415 | 420 | ||
416 | case "grdmap": | 421 | case "grdmap": |
417 | ExportImage(args[2], args[3]); | 422 | ExportImage(filename, args[3]); |
418 | break; | 423 | break; |
419 | 424 | ||
420 | case "png": | 425 | case "png": |
421 | heightmap.SaveImage(args[2]); | 426 | heightmap.SaveImage(filename); |
422 | break; | 427 | break; |
423 | 428 | ||
424 | case "raw": | 429 | case "raw": |
425 | WriteToFileRAW(args[2]); | 430 | WriteToFileRAW(filename); |
426 | break; | 431 | break; |
427 | 432 | ||
428 | case "hiraw": | 433 | case "hiraw": |
429 | WriteToFileHiRAW(args[2]); | 434 | WriteToFileHiRAW(filename); |
430 | break; | 435 | break; |
431 | 436 | ||
432 | default: | 437 | default: |