diff options
author | Adam Frisby | 2007-04-21 05:51:10 +0000 |
---|---|---|
committer | Adam Frisby | 2007-04-21 05:51:10 +0000 |
commit | 2844c56ef4c8cb671b481a356d6aac33851c0c04 (patch) | |
tree | f4e8b0c030a3db69391814a07aafb34149c356d6 /OpenSim.RegionServer/world | |
parent | Config: (diff) | |
download | opensim-SC_OLD-2844c56ef4c8cb671b481a356d6aac33851c0c04.zip opensim-SC_OLD-2844c56ef4c8cb671b481a356d6aac33851c0c04.tar.gz opensim-SC_OLD-2844c56ef4c8cb671b481a356d6aac33851c0c04.tar.bz2 opensim-SC_OLD-2844c56ef4c8cb671b481a356d6aac33851c0c04.tar.xz |
Terrain / Physics / Storage:
* Added terrain "taint" - if terrain is tainted, the terrain is marked as needing to be saved.
* Added check for taint in the Backup() routine, if taint is found, terrain is saved and physics engine is notified.
Diffstat (limited to 'OpenSim.RegionServer/world')
-rw-r--r-- | OpenSim.RegionServer/world/World.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs index 56f5edb..4d57f14 100644 --- a/OpenSim.RegionServer/world/World.cs +++ b/OpenSim.RegionServer/world/World.cs | |||
@@ -282,7 +282,7 @@ namespace OpenSim.world | |||
282 | Console.WriteLine("creating new terrain"); | 282 | Console.WriteLine("creating new terrain"); |
283 | this.Terrain.hills(); | 283 | this.Terrain.hills(); |
284 | 284 | ||
285 | //this.localStorage.SaveMap(this.Terrain.map); | 285 | this.localStorage.SaveMap(this.Terrain.getHeights1D()); |
286 | } | 286 | } |
287 | else | 287 | else |
288 | { | 288 | { |
@@ -423,7 +423,14 @@ namespace OpenSim.world | |||
423 | 423 | ||
424 | public bool Backup() | 424 | public bool Backup() |
425 | { | 425 | { |
426 | 426 | if (Terrain.tainted > 0) | |
427 | { | ||
428 | Terrain.tainted = 0; | ||
429 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Backup() - Terrain tainted, saving."); | ||
430 | localStorage.SaveMap(Terrain.getHeights1D()); | ||
431 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Backup() - Terrain saved, informing Physics."); | ||
432 | phyScene.SetTerrain(Terrain.getHeights1D()); | ||
433 | } | ||
427 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Backup() - Backing up Primitives"); | 434 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Backup() - Backing up Primitives"); |
428 | foreach (libsecondlife.LLUUID UUID in Entities.Keys) | 435 | foreach (libsecondlife.LLUUID UUID in Entities.Keys) |
429 | { | 436 | { |