aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorlbsa712007-11-30 08:08:14 +0000
committerlbsa712007-11-30 08:08:14 +0000
commitd2b1b54f497b9d401958806b433559dbbb9fa4fa (patch)
tree870e65ce7c0067ddda0c1c6a7011fdefa4c5bc68 /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
parent* Extended our semi-stupid implementation of in world object permissions to s... (diff)
downloadopensim-SC_OLD-d2b1b54f497b9d401958806b433559dbbb9fa4fa.zip
opensim-SC_OLD-d2b1b54f497b9d401958806b433559dbbb9fa4fa.tar.gz
opensim-SC_OLD-d2b1b54f497b9d401958806b433559dbbb9fa4fa.tar.bz2
opensim-SC_OLD-d2b1b54f497b9d401958806b433559dbbb9fa4fa.tar.xz
* Removed permissions flag appliance from Xml deserialization
* Various code convention compliance
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs23
1 files changed, 14 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index cc0b8ba..1b55a49 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -264,6 +264,7 @@ namespace OpenSim.Region.Environment.Scenes
264 reader.ReadStartElement("SceneObjectGroup"); 264 reader.ReadStartElement("SceneObjectGroup");
265 reader.ReadStartElement("RootPart"); 265 reader.ReadStartElement("RootPart");
266 m_rootPart = SceneObjectPart.FromXml(reader); 266 m_rootPart = SceneObjectPart.FromXml(reader);
267
267 reader.ReadEndElement(); 268 reader.ReadEndElement();
268 269
269 while (reader.Read()) 270 while (reader.Read())
@@ -274,10 +275,13 @@ namespace OpenSim.Region.Environment.Scenes
274 if (reader.Name == "Part") 275 if (reader.Name == "Part")
275 { 276 {
276 reader.Read(); 277 reader.Read();
277 SceneObjectPart Part = SceneObjectPart.FromXml(reader); 278 SceneObjectPart part = SceneObjectPart.FromXml(reader);
278 Part.LocalID = m_scene.PrimIDAllocate(); 279 part.LocalID = m_scene.PrimIDAllocate();
279 AddPart(Part); 280 AddPart(part);
280 Part.RegionHandle = m_regionHandle; 281 part.RegionHandle = m_regionHandle;
282
283 part.ApplyPermissions();
284 part.ApplyPhysics();
281 } 285 }
282 break; 286 break;
283 case XmlNodeType.EndElement: 287 case XmlNodeType.EndElement:
@@ -286,8 +290,9 @@ namespace OpenSim.Region.Environment.Scenes
286 } 290 }
287 reader.Close(); 291 reader.Close();
288 sr.Close(); 292 sr.Close();
289 m_rootPart.SetParent(this); 293
290 m_parts.Add(m_rootPart.UUID, m_rootPart); 294 AddPart( m_rootPart );
295
291 m_rootPart.LocalID = m_scene.PrimIDAllocate(); 296 m_rootPart.LocalID = m_scene.PrimIDAllocate();
292 m_rootPart.ParentID = 0; 297 m_rootPart.ParentID = 0;
293 m_rootPart.RegionHandle = m_regionHandle; 298 m_rootPart.RegionHandle = m_regionHandle;
@@ -524,7 +529,7 @@ namespace OpenSim.Region.Environment.Scenes
524 new Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X, 529 new Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X,
525 dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z), 530 dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z),
526 dupe.RootPart.PhysActor.IsPhysical); 531 dupe.RootPart.PhysActor.IsPhysical);
527 dupe.RootPart.doPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); 532 dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true);
528 533
529 } 534 }
530 // Now we've made a copy that replaces this one, we need to 535 // Now we've made a copy that replaces this one, we need to
@@ -906,7 +911,7 @@ namespace OpenSim.Region.Environment.Scenes
906 new Quaternion(linkPart.RotationOffset.W, linkPart.RotationOffset.X, 911 new Quaternion(linkPart.RotationOffset.W, linkPart.RotationOffset.X,
907 linkPart.RotationOffset.Y, linkPart.RotationOffset.Z), 912 linkPart.RotationOffset.Y, linkPart.RotationOffset.Z),
908 m_rootPart.PhysActor.IsPhysical); 913 m_rootPart.PhysActor.IsPhysical);
909 m_rootPart.doPhysicsPropertyUpdate(m_rootPart.PhysActor.IsPhysical, true); 914 m_rootPart.DoPhysicsPropertyUpdate(m_rootPart.PhysActor.IsPhysical, true);
910 915
911 } 916 }
912 917
@@ -1216,7 +1221,7 @@ namespace OpenSim.Region.Environment.Scenes
1216 m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z), 1221 m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z),
1217 m_rootPart.PhysActor.IsPhysical); 1222 m_rootPart.PhysActor.IsPhysical);
1218 bool UsePhysics = ((m_rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0); 1223 bool UsePhysics = ((m_rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0);
1219 m_rootPart.doPhysicsPropertyUpdate(UsePhysics, true); 1224 m_rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
1220 1225
1221 } 1226 }
1222 } 1227 }