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.
0.1-prestable
Adam Frisby 2007-04-21 05:51:10 +00:00
parent 9990bf4826
commit 2844c56ef4
1 changed files with 9 additions and 2 deletions

View File

@ -282,7 +282,7 @@ namespace OpenSim.world
Console.WriteLine("creating new terrain");
this.Terrain.hills();
//this.localStorage.SaveMap(this.Terrain.map);
this.localStorage.SaveMap(this.Terrain.getHeights1D());
}
else
{
@ -423,7 +423,14 @@ namespace OpenSim.world
public bool Backup()
{
if (Terrain.tainted > 0)
{
Terrain.tainted = 0;
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Backup() - Terrain tainted, saving.");
localStorage.SaveMap(Terrain.getHeights1D());
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Backup() - Terrain saved, informing Physics.");
phyScene.SetTerrain(Terrain.getHeights1D());
}
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs: Backup() - Backing up Primitives");
foreach (libsecondlife.LLUUID UUID in Entities.Keys)
{