From cd2a411afe62412f6ac2df29b7426ba25ee00f43 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 2 Aug 2007 20:51:06 +0000 Subject: * Terrain load variables now work. HiRAW exporter works wonderfully. :D --- OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs index 09e6335..27259b9 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs @@ -365,23 +365,26 @@ namespace OpenSim.Region.Terrain break; case "load": - args[2].Replace("%name%", simName); + string filenameL = args[2].Replace("%name%", simName); + filenameL = filenameL.Replace("%x%", this.offsetX.ToString()); + filenameL = filenameL.Replace("%y%", this.offsetY.ToString()); + switch (args[1].ToLower()) { case "f32": - LoadFromFileF32(args[2]); + LoadFromFileF32(filenameL); break; case "f64": - LoadFromFileF64(args[2]); + LoadFromFileF64(filenameL); break; case "raw": - LoadFromFileSLRAW(args[2]); + LoadFromFileSLRAW(filenameL); break; case "img": - heightmap.LoadImage(args[2]); + heightmap.LoadImage(filenameL); break; default: -- cgit v1.1