From 17421593528f4126256dea6d0c844da9c218fdb7 Mon Sep 17 00:00:00 2001 From: mingchen Date: Mon, 4 Jun 2007 14:09:19 +0000 Subject: Parcel Manager Changes: *Added Parcel Backup Support for DB4. Other storages currently do not save *Added parcelIDList in ParcelManager to speed up parcel fetching at position *Added ParcelData.cs and ParcelData class for better storage support *Documentation for parcel added *2 Parcel Related bug fixes --- OpenSim/OpenSim.RegionServer/world/World.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'OpenSim/OpenSim.RegionServer/world/World.cs') diff --git a/OpenSim/OpenSim.RegionServer/world/World.cs b/OpenSim/OpenSim.RegionServer/world/World.cs index d2a13ca..92de6f0 100644 --- a/OpenSim/OpenSim.RegionServer/world/World.cs +++ b/OpenSim/OpenSim.RegionServer/world/World.cs @@ -35,7 +35,7 @@ namespace OpenSim.world private Dictionary m_scripts; private Mutex updateLock; public string m_datastore; - public ParcelManager parcelManager; + public OpenSim.RegionServer.world.ParcelManager parcelManager; #region Properties public PhysicsScene PhysScene @@ -86,7 +86,6 @@ namespace OpenSim.world Avatar.LoadAnims(); this.SetDefaultScripts(); this.LoadScriptEngines(); - parcelManager = new ParcelManager(this); } catch (Exception e) @@ -252,6 +251,17 @@ namespace OpenSim.world Entities[UUID].BackUp(); } + + //Parcel backup routines. Yay! + ParcelData[] parcels = new ParcelData[parcelManager.parcelList.Count]; + int i; + for(i = 0; i < parcelManager.parcelList.Count; i++) + { + parcels[i] = parcelManager.parcelList[i].parcelData; + } + localStorage.SaveParcels(parcels); + + // Backup successful return true; } @@ -576,7 +586,7 @@ namespace OpenSim.world agentClient.OnUpdatePrimScale += new ClientView.UpdatePrimVector(this.UpdatePrimScale); agentClient.OnDeRezObject += new ClientView.GenericCall4(this.DeRezObject); - agentClient.OnParcelPropertiesRequest += new ParcelPropertiesRequest(ParcelPropertiesRequest); + agentClient.OnParcelPropertiesRequest += new OpenSim.RegionServer.world.ParcelPropertiesRequest(ParcelPropertiesRequest); Avatar newAvatar = null; try { -- cgit v1.1