diff options
author | MW | 2007-03-08 18:07:53 +0000 |
---|---|---|
committer | MW | 2007-03-08 18:07:53 +0000 |
commit | aa120266d79b87b39bf80f3f7aaca8970447bde1 (patch) | |
tree | cecae22f2d8b2fc7541a011d2db86f819901c51f /src/world/World.cs | |
parent | Changed water height to default of 20 (diff) | |
download | opensim-SC_OLD-aa120266d79b87b39bf80f3f7aaca8970447bde1.zip opensim-SC_OLD-aa120266d79b87b39bf80f3f7aaca8970447bde1.tar.gz opensim-SC_OLD-aa120266d79b87b39bf80f3f7aaca8970447bde1.tar.bz2 opensim-SC_OLD-aa120266d79b87b39bf80f3f7aaca8970447bde1.tar.xz |
Primitive's shape and scale are now saved into database and reloaded.
New ServerConsole command: regenerate - will regenerate the terrain of the whole sim.
Diffstat (limited to 'src/world/World.cs')
-rw-r--r-- | src/world/World.cs | 15 |
1 files changed, 13 insertions, 2 deletions
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 | |||
71 | 71 | ||
72 | //backup world data | 72 | //backup world data |
73 | this.storageCount++; | 73 | this.storageCount++; |
74 | if(storageCount> 1200) //set to how often you want to backup (currently set for about every 2 minutes) | 74 | if(storageCount> 300) //set to how often you want to backup |
75 | { | 75 | { |
76 | this.Backup(); | 76 | this.Backup(); |
77 | storageCount =0; | 77 | storageCount =0; |
@@ -107,13 +107,24 @@ namespace OpenSim.world | |||
107 | return(store == null); | 107 | return(store == null); |
108 | } | 108 | } |
109 | 109 | ||
110 | public void RegenerateTerrain() | ||
111 | { | ||
112 | HeightmapGenHills hills = new HeightmapGenHills(); | ||
113 | this.LandMap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); | ||
114 | this.phyScene.SetTerrain(this.LandMap); | ||
115 | OpenSim_Main.cfg.SaveMap(); | ||
116 | |||
117 | foreach(OpenSimClient client in OpenSim_Main.sim.ClientThreads.Values) { | ||
118 | this.SendLayerData(client); | ||
119 | } | ||
120 | } | ||
110 | public void LoadPrimsFromStorage() | 121 | public void LoadPrimsFromStorage() |
111 | { | 122 | { |
112 | ServerConsole.MainConsole.Instance.WriteLine("World.cs: LoadPrimsFromStorage() - Loading primitives"); | 123 | ServerConsole.MainConsole.Instance.WriteLine("World.cs: LoadPrimsFromStorage() - Loading primitives"); |
113 | this.localStorage.LoadPrimitives(this); | 124 | this.localStorage.LoadPrimitives(this); |
114 | } | 125 | } |
115 | 126 | ||
116 | public void PrimFromStorage(PrimStorage prim) | 127 | public void PrimFromStorage(PrimData prim) |
117 | { | 128 | { |
118 | if(prim.LocalID >= this._primCount) | 129 | if(prim.LocalID >= this._primCount) |
119 | { | 130 | { |