diff options
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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 56 |
1 files changed, 53 insertions, 3 deletions
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 | |||
44 | set { m_parts = value; } | 44 | set { m_parts = value; } |
45 | } | 45 | } |
46 | 46 | ||
47 | public SceneObjectPart RootPart | ||
48 | { | ||
49 | set { m_rootPart = value; } | ||
50 | } | ||
51 | |||
52 | public ulong RegionHandle | ||
53 | { | ||
54 | get { return m_regionHandle; } | ||
55 | set | ||
56 | { | ||
57 | m_regionHandle = value; | ||
58 | lock (this.m_parts) | ||
59 | { | ||
60 | foreach (SceneObjectPart part in this.m_parts.Values) | ||
61 | { | ||
62 | part.RegionHandle = m_regionHandle; | ||
63 | } | ||
64 | } | ||
65 | } | ||
66 | } | ||
67 | |||
47 | public override LLVector3 Pos | 68 | public override LLVector3 Pos |
48 | { | 69 | { |
49 | get { return m_rootPart.GroupPosition; } | 70 | get { return m_rootPart.GroupPosition; } |
@@ -79,9 +100,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
79 | /// <summary> | 100 | /// <summary> |
80 | /// Added because the Parcel code seems to use it | 101 | /// Added because the Parcel code seems to use it |
81 | /// but not sure a object should have this | 102 | /// but not sure a object should have this |
82 | /// as what does it tell us? that some avatar has selected it | 103 | /// as what does it tell us? that some avatar has selected it (but not what Avatar/user) |
83 | /// think really there should be a list (or whatever) in each scenepresence | 104 | /// think really there should be a list (or whatever) in each scenepresence |
84 | /// saying what prim(s) that user has selected at any time. | 105 | /// saying what prim(s) that user has selected. |
85 | /// </summary> | 106 | /// </summary> |
86 | protected bool m_isSelected = false; | 107 | protected bool m_isSelected = false; |
87 | public bool IsSelected | 108 | public bool IsSelected |
@@ -114,7 +135,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
114 | m_regionHandle = regionHandle; | 135 | m_regionHandle = regionHandle; |
115 | m_scene = scene; | 136 | m_scene = scene; |
116 | 137 | ||
117 | this.Pos = pos; | 138 | // this.Pos = pos; |
118 | LLVector3 rootOffset = new LLVector3(0, 0, 0); | 139 | LLVector3 rootOffset = new LLVector3(0, 0, 0); |
119 | SceneObjectPart newPart = new SceneObjectPart(m_regionHandle, this, ownerID, localID, shape, pos, rootOffset); | 140 | SceneObjectPart newPart = new SceneObjectPart(m_regionHandle, this, ownerID, localID, shape, pos, rootOffset); |
120 | this.m_parts.Add(newPart.UUID, newPart); | 141 | this.m_parts.Add(newPart.UUID, newPart); |
@@ -136,6 +157,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
136 | dupe.m_regionHandle = this.m_regionHandle; | 157 | dupe.m_regionHandle = this.m_regionHandle; |
137 | 158 | ||
138 | dupe.CopyRootPart(this.m_rootPart); | 159 | dupe.CopyRootPart(this.m_rootPart); |
160 | m_scene.EventManager.OnBackup += dupe.ProcessBackup; | ||
139 | 161 | ||
140 | foreach (SceneObjectPart part in this.m_parts.Values) | 162 | foreach (SceneObjectPart part in this.m_parts.Values) |
141 | { | 163 | { |
@@ -148,6 +170,23 @@ namespace OpenSim.Region.Environment.Scenes | |||
148 | } | 170 | } |
149 | 171 | ||
150 | /// <summary> | 172 | /// <summary> |
173 | /// Added as a way for the storage provider to reset the scene, | ||
174 | /// most likely a better way to do this sort of thing but for now... | ||
175 | /// </summary> | ||
176 | /// <param name="scene"></param> | ||
177 | public void SetScene(Scene scene) | ||
178 | { | ||
179 | m_scene = scene; | ||
180 | m_scene.EventManager.OnBackup += this.ProcessBackup; | ||
181 | } | ||
182 | |||
183 | public void AddPart(SceneObjectPart part) | ||
184 | { | ||
185 | part.SetParent(this); | ||
186 | this.m_parts.Add(part.UUID, part); | ||
187 | } | ||
188 | |||
189 | /// <summary> | ||
151 | /// | 190 | /// |
152 | /// </summary> | 191 | /// </summary> |
153 | /// <param name="part"></param> | 192 | /// <param name="part"></param> |
@@ -619,6 +658,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
619 | return m_scene.RequestAvatarList(); | 658 | return m_scene.RequestAvatarList(); |
620 | } | 659 | } |
621 | 660 | ||
661 | public void SendFullUpdateToClient(IClientAPI remoteClient) | ||
662 | { | ||
663 | lock (this.m_parts) | ||
664 | { | ||
665 | foreach (SceneObjectPart part in this.m_parts.Values) | ||
666 | { | ||
667 | this.SendPartFullUpdate(remoteClient, part); | ||
668 | } | ||
669 | } | ||
670 | } | ||
671 | |||
622 | /// <summary> | 672 | /// <summary> |
623 | /// | 673 | /// |
624 | /// </summary> | 674 | /// </summary> |