From 94c7e41ef1978a5be21e1a063c68ffc1c8a89b97 Mon Sep 17 00:00:00 2001
From: MW
Date: Fri, 10 Aug 2007 13:59:19 +0000
Subject: Made a few changes so that once we enable the sqlite data store
(simple line change in OpenSimMain), then basic ( with a few limits at
moment) prim database backup will work.
---
.../Region/Environment/Scenes/SceneObjectGroup.cs | 56 ++++++++++++++++++++--
1 file changed, 53 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 78dd69c..8b761f6 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -44,6 +44,27 @@ namespace OpenSim.Region.Environment.Scenes
set { m_parts = value; }
}
+ public SceneObjectPart RootPart
+ {
+ set { m_rootPart = value; }
+ }
+
+ public ulong RegionHandle
+ {
+ get { return m_regionHandle; }
+ set
+ {
+ m_regionHandle = value;
+ lock (this.m_parts)
+ {
+ foreach (SceneObjectPart part in this.m_parts.Values)
+ {
+ part.RegionHandle = m_regionHandle;
+ }
+ }
+ }
+ }
+
public override LLVector3 Pos
{
get { return m_rootPart.GroupPosition; }
@@ -79,9 +100,9 @@ namespace OpenSim.Region.Environment.Scenes
///
/// Added because the Parcel code seems to use it
/// but not sure a object should have this
- /// as what does it tell us? that some avatar has selected it
+ /// as what does it tell us? that some avatar has selected it (but not what Avatar/user)
/// think really there should be a list (or whatever) in each scenepresence
- /// saying what prim(s) that user has selected at any time.
+ /// saying what prim(s) that user has selected.
///
protected bool m_isSelected = false;
public bool IsSelected
@@ -114,7 +135,7 @@ namespace OpenSim.Region.Environment.Scenes
m_regionHandle = regionHandle;
m_scene = scene;
- this.Pos = pos;
+ // this.Pos = pos;
LLVector3 rootOffset = new LLVector3(0, 0, 0);
SceneObjectPart newPart = new SceneObjectPart(m_regionHandle, this, ownerID, localID, shape, pos, rootOffset);
this.m_parts.Add(newPart.UUID, newPart);
@@ -136,6 +157,7 @@ namespace OpenSim.Region.Environment.Scenes
dupe.m_regionHandle = this.m_regionHandle;
dupe.CopyRootPart(this.m_rootPart);
+ m_scene.EventManager.OnBackup += dupe.ProcessBackup;
foreach (SceneObjectPart part in this.m_parts.Values)
{
@@ -148,6 +170,23 @@ namespace OpenSim.Region.Environment.Scenes
}
///
+ /// Added as a way for the storage provider to reset the scene,
+ /// most likely a better way to do this sort of thing but for now...
+ ///
+ ///
+ public void SetScene(Scene scene)
+ {
+ m_scene = scene;
+ m_scene.EventManager.OnBackup += this.ProcessBackup;
+ }
+
+ public void AddPart(SceneObjectPart part)
+ {
+ part.SetParent(this);
+ this.m_parts.Add(part.UUID, part);
+ }
+
+ ///
///
///
///
@@ -619,6 +658,17 @@ namespace OpenSim.Region.Environment.Scenes
return m_scene.RequestAvatarList();
}
+ public void SendFullUpdateToClient(IClientAPI remoteClient)
+ {
+ lock (this.m_parts)
+ {
+ foreach (SceneObjectPart part in this.m_parts.Values)
+ {
+ this.SendPartFullUpdate(remoteClient, part);
+ }
+ }
+ }
+
///
///
///
--
cgit v1.1