From aa120266d79b87b39bf80f3f7aaca8970447bde1 Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 8 Mar 2007 18:07:53 +0000 Subject: Primitive's shape and scale are now saved into database and reloaded. New ServerConsole command: regenerate - will regenerate the terrain of the whole sim. --- src/world/World.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/world/World.cs') diff --git a/src/world/World.cs b/src/world/World.cs index 6be9dd2..fb78819 100644 --- a/src/world/World.cs +++ b/src/world/World.cs @@ -71,7 +71,7 @@ namespace OpenSim.world //backup world data this.storageCount++; - if(storageCount> 1200) //set to how often you want to backup (currently set for about every 2 minutes) + if(storageCount> 300) //set to how often you want to backup { this.Backup(); storageCount =0; @@ -107,13 +107,24 @@ namespace OpenSim.world return(store == null); } + public void RegenerateTerrain() + { + HeightmapGenHills hills = new HeightmapGenHills(); + this.LandMap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); + this.phyScene.SetTerrain(this.LandMap); + OpenSim_Main.cfg.SaveMap(); + + foreach(OpenSimClient client in OpenSim_Main.sim.ClientThreads.Values) { + this.SendLayerData(client); + } + } public void LoadPrimsFromStorage() { ServerConsole.MainConsole.Instance.WriteLine("World.cs: LoadPrimsFromStorage() - Loading primitives"); this.localStorage.LoadPrimitives(this); } - public void PrimFromStorage(PrimStorage prim) + public void PrimFromStorage(PrimData prim) { if(prim.LocalID >= this._primCount) { -- cgit v1.1