mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
The regionUUID is now being passed to the datastore calls.
This commit is contained in:
@@ -47,10 +47,10 @@ namespace OpenSim.Region.Interfaces
|
||||
/// <param name="dbname">The name of the database to store to (may not be applicable)</param>
|
||||
void Initialise(string filename, string dbname);
|
||||
|
||||
void StoreObject(SceneObjectGroup obj);
|
||||
void RemoveObject(LLUUID uuid);
|
||||
void StoreObject(SceneObjectGroup obj, LLUUID regionUUID);
|
||||
void RemoveObject(LLUUID uuid, LLUUID regionUUID);
|
||||
|
||||
List<SceneObjectGroup> LoadObjects();
|
||||
List<SceneObjectGroup> LoadObjects(LLUUID regionUUID);
|
||||
|
||||
void StoreTerrain(double[,] terrain);
|
||||
double[,] LoadTerrain();
|
||||
|
||||
@@ -270,7 +270,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
remoteClient.SendInventoryItemUpdate(item);
|
||||
}
|
||||
|
||||
storageManager.DataStore.RemoveObject(((SceneObjectGroup)selectedEnt).UUID);
|
||||
storageManager.DataStore.RemoveObject(((SceneObjectGroup)selectedEnt).UUID, m_regInfo.SimUUID);
|
||||
((SceneObjectGroup)selectedEnt).DeleteGroup();
|
||||
|
||||
lock (Entities)
|
||||
|
||||
@@ -180,6 +180,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
ScenePresence.LoadAnims();
|
||||
|
||||
httpListener = httpServer;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -497,7 +499,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
public void LoadPrimsFromStorage()
|
||||
{
|
||||
MainLog.Instance.Verbose("Loading objects from datastore");
|
||||
List<SceneObjectGroup> PrimsFromDB = storageManager.DataStore.LoadObjects();
|
||||
List<SceneObjectGroup> PrimsFromDB = storageManager.DataStore.LoadObjects(this.m_regInfo.SimUUID);
|
||||
foreach (SceneObjectGroup prim in PrimsFromDB)
|
||||
{
|
||||
AddEntityFromStorage(prim);
|
||||
@@ -707,7 +709,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
client.OnFetchInventory += commsManager.UserProfiles.HandleFetchInventory;
|
||||
client.OnAssetUploadRequest += commsManager.TransactionsManager.HandleUDPUploadRequest;
|
||||
client.OnXferReceive += commsManager.TransactionsManager.HandleXfer;
|
||||
// client.OnRequestXfer += RequestXfer;
|
||||
// client.OnRequestXfer += RequestXfer;
|
||||
|
||||
client.OnRequestAvatarProperties += RequestAvatarProperty;
|
||||
|
||||
@@ -919,9 +921,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
if (agent.CapsPath != "")
|
||||
{
|
||||
//Console.WriteLine("new user, so creating caps handler for it");
|
||||
Caps cap =
|
||||
new Caps(assetCache, httpListener, m_regInfo.ExternalHostName, m_regInfo.ExternalEndPoint.Port,
|
||||
agent.CapsPath, agent.AgentID);
|
||||
Caps cap = new Caps(assetCache, httpListener, m_regInfo.ExternalHostName, m_regInfo.ExternalEndPoint.Port, agent.CapsPath, agent.AgentID);
|
||||
Util.SetCapsURL(agent.AgentID, "http://" + m_regInfo.ExternalHostName + ":" + httpListener.Port.ToString() + "/CAPS/" + agent.CapsPath + "0000/");
|
||||
cap.RegisterHandlers();
|
||||
cap.AddNewInventoryItem = this.AddInventoryItem;
|
||||
|
||||
@@ -436,12 +436,26 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
linkPart.SetParent(this);
|
||||
|
||||
//TODO: rest of parts
|
||||
foreach (SceneObjectPart part in objectGroup.Children.Values)
|
||||
{
|
||||
if (part.UUID != objectGroup.m_rootPart.UUID)
|
||||
{
|
||||
this.LinkNonRootPart(part);
|
||||
}
|
||||
}
|
||||
|
||||
m_scene.EventManager.OnBackup -= objectGroup.ProcessBackup;
|
||||
m_scene.DeleteEntity(objectGroup.UUID);
|
||||
this.ScheduleGroupForFullUpdate();
|
||||
}
|
||||
|
||||
private void LinkNonRootPart(SceneObjectPart part)
|
||||
{
|
||||
part.SetParent(this);
|
||||
part.ParentID = this.m_rootPart.LocalID;
|
||||
this.m_parts.Add(part.UUID, part);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -812,7 +826,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
/// <param name="datastore"></param>
|
||||
public void ProcessBackup(OpenSim.Region.Interfaces.IRegionDataStore datastore)
|
||||
{
|
||||
datastore.StoreObject(this);
|
||||
datastore.StoreObject(this, m_scene.RegionInfo.SimUUID);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -496,6 +496,16 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
this.m_scene.SendAllSceneObjectsToClient(this.ControllingClient);
|
||||
this.ControllingClient.SendViewerTime(this.m_scene.TimePhase);
|
||||
|
||||
//Please don't remove the following code (at least not yet), just leave it commented out
|
||||
//gives the user god powers, should help with debuging things in the future
|
||||
/*
|
||||
GrantGodlikePowersPacket grant = new GrantGodlikePowersPacket();
|
||||
grant.AgentData.AgentID = this.ControllingClient.AgentId;
|
||||
grant.AgentData.SessionID = this.ControllingClient.SessionId;
|
||||
grant.GrantData.GodLevel = 255;
|
||||
grant.GrantData.Token = LLUUID.Random();
|
||||
this.ControllingClient.OutPacket(grant);*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user