aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Region/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMW2007-06-17 19:25:04 +0000
committerMW2007-06-17 19:25:04 +0000
commit99a308007c6c13dc13a2184eb34014de94d75ea8 (patch)
treeb696f870406953b7465313e9eda4210c94f85a38 /OpenSim/OpenSim.Region/Scenes/Scene.cs
parentEach Region will now generate a texture image of their terrain and this will ... (diff)
downloadopensim-SC_OLD-99a308007c6c13dc13a2184eb34014de94d75ea8.zip
opensim-SC_OLD-99a308007c6c13dc13a2184eb34014de94d75ea8.tar.gz
opensim-SC_OLD-99a308007c6c13dc13a2184eb34014de94d75ea8.tar.bz2
opensim-SC_OLD-99a308007c6c13dc13a2184eb34014de94d75ea8.tar.xz
Fixed inverted map texture problem.
Added(from trunk) the loading of terrain files defined in the region.xml files.
Diffstat (limited to '')
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Scene.cs25
1 files changed, 23 insertions, 2 deletions
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.cs b/OpenSim/OpenSim.Region/Scenes/Scene.cs
index ca9a112..5744f1f 100644
--- a/OpenSim/OpenSim.Region/Scenes/Scene.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Scene.cs
@@ -415,10 +415,31 @@ namespace OpenSim.Region.Scenes
415 float[] map = this.localStorage.LoadWorld(); 415 float[] map = this.localStorage.LoadWorld();
416 if (map == null) 416 if (map == null)
417 { 417 {
418 Console.WriteLine("creating new terrain"); 418 // Console.WriteLine("creating new terrain");
419 this.Terrain.hills(); 419 // this.Terrain.hills();
420 420
421 // this.localStorage.SaveMap(this.Terrain.getHeights1D()); 421 // this.localStorage.SaveMap(this.Terrain.getHeights1D());
422 if (string.IsNullOrEmpty(this.m_regInfo.estateSettings.terrainFile))
423 {
424 Console.WriteLine("No default terrain, procedurally generating...");
425 this.Terrain.hills();
426
427 // this.localStorage.SaveMap(this.Terrain.getHeights1D());
428 }
429 else
430 {
431 try
432 {
433 this.Terrain.loadFromFileF32(this.m_regInfo.estateSettings.terrainFile);
434 this.Terrain *= this.m_regInfo.estateSettings.terrainMultiplier;
435 }
436 catch
437 {
438 Console.WriteLine("Unable to load default terrain, procedurally generating instead...");
439 Terrain.hills();
440 }
441 // this.localStorage.SaveMap(this.Terrain.getHeights1D());
442 }
422 } 443 }
423 else 444 else
424 { 445 {