From 32aacd4f363d2617125ef9fdff175681d9f4237e Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 21 Jul 2007 07:23:00 +0000 Subject: * Issue#209 - Terrain Hills Patch (Thanks Babblefrog) * Issue#208 - Region crossing should be using External host (Thanks Babblefrog) * Issue#207 - Prebuild.xml contains path errors (Thanks Gareth) --- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 2 +- OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs | 20 +++++++++++++------- prebuild.xml | 3 ++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 473dae9..2bb4fb2 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -555,7 +555,7 @@ namespace OpenSim.Region.Environment.Scenes if (res) { this.MakeChildAgent(); - this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.InternalEndPoint); + this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint); } } } diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs index 6f3afea..8f3e04f 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs @@ -216,6 +216,8 @@ namespace OpenSim.Region.Terrain { case "help": resultText += "terrain regenerate - rebuilds the sims terrain using a default algorithm\n"; + resultText += "terrain hills \n"; + resultText += " type should be spheres, blocks, cones, or squared\n"; resultText += "terrain voronoi - generates a worley fractal with X points per block"; resultText += "terrain seed - sets the random seed value to \n"; resultText += "terrain load - loads a terrain from disk, type can be 'F32', 'F64', 'RAW' or 'IMG'\n"; @@ -272,6 +274,7 @@ namespace OpenSim.Region.Terrain case "multiply": heightmap *= Convert.ToDouble(args[1]); + tainted++; break; case "load": @@ -383,6 +386,8 @@ namespace OpenSim.Region.Terrain private bool consoleHills(string[] args, ref string resultText) { + Random RandomClass = new Random(); + setSeed(RandomClass.Next()); int count; double sizeMin; double sizeRange; @@ -392,12 +397,12 @@ namespace OpenSim.Region.Terrain if (args.GetLength(0) > 2) { - count = Convert.ToInt32(args[2]); - sizeMin = Convert.ToDouble(args[3]); - sizeRange = Convert.ToDouble(args[4]); - island = Convert.ToBoolean(args[5]); - additive = Convert.ToBoolean(args[6]); - noisy = Convert.ToBoolean(args[7]); + int.TryParse(args[2].ToString(), out count); + double.TryParse(args[3].ToString(), out sizeMin); + double.TryParse(args[4].ToString(), out sizeRange); + bool.TryParse(args[5].ToString(), out island); + bool.TryParse(args[6].ToString(), out additive); + bool.TryParse(args[7].ToString(), out noisy); } else { @@ -427,6 +432,7 @@ namespace OpenSim.Region.Terrain resultText = "Unknown hills type"; return false; } + tainted++; return true; } @@ -951,4 +957,4 @@ namespace OpenSim.Region.Terrain return imageData; } } -} \ No newline at end of file +} diff --git a/prebuild.xml b/prebuild.xml index 6580fec..42824a5 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -116,7 +116,7 @@ - ../../../bin/ + ../../../../bin/ @@ -124,6 +124,7 @@ + -- cgit v1.1