small bit of refactoring
parent
05df857132
commit
19f8b14120
|
@ -394,27 +394,30 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
remoteClient.SendInventoryItemUpdate(item);
|
remoteClient.SendInventoryItemUpdate(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
SceneObjectPart rootPart =
|
DeleteSceneObjectGroup((SceneObjectGroup)selectedEnt);
|
||||||
((SceneObjectGroup) selectedEnt).GetChildPart(((SceneObjectGroup) selectedEnt).UUID);
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteSceneObjectGroup(SceneObjectGroup group)
|
||||||
|
{
|
||||||
|
SceneObjectPart rootPart = (group).GetChildPart(group.UUID);
|
||||||
if (rootPart.PhysActor != null)
|
if (rootPart.PhysActor != null)
|
||||||
{
|
{
|
||||||
phyScene.RemovePrim(rootPart.PhysActor);
|
phyScene.RemovePrim(rootPart.PhysActor);
|
||||||
rootPart.PhysActor = null;
|
rootPart.PhysActor = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
storageManager.DataStore.RemoveObject(((SceneObjectGroup) selectedEnt).UUID,
|
storageManager.DataStore.RemoveObject(group.UUID, m_regInfo.RegionID);
|
||||||
m_regInfo.RegionID);
|
group.DeleteGroup();
|
||||||
((SceneObjectGroup) selectedEnt).DeleteGroup();
|
|
||||||
|
|
||||||
lock (Entities)
|
lock (Entities)
|
||||||
{
|
{
|
||||||
Entities.Remove(((SceneObjectGroup) selectedEnt).UUID);
|
Entities.Remove(group.UUID);
|
||||||
}
|
|
||||||
((SceneObjectGroup) selectedEnt).DeleteParts();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
group.DeleteParts();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos)
|
public void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos)
|
||||||
|
|
|
@ -270,26 +270,31 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
StringReader sr = new StringReader(xmlData);
|
StringReader sr = new StringReader(xmlData);
|
||||||
XmlTextReader reader = new XmlTextReader(sr);
|
XmlTextReader reader = new XmlTextReader(sr);
|
||||||
reader.Read();
|
reader.Read();
|
||||||
|
|
||||||
reader.ReadStartElement("SceneObjectGroup");
|
reader.ReadStartElement("SceneObjectGroup");
|
||||||
// reader.ReadStartElement("RootPart");
|
// reader.ReadStartElement("RootPart");
|
||||||
m_rootPart = SceneObjectPart.FromXml(reader);
|
m_rootPart = SceneObjectPart.FromXml(reader);
|
||||||
//reader.ReadEndElement();
|
|
||||||
|
|
||||||
while (reader.Read())
|
reader.Read();
|
||||||
|
bool more = true;
|
||||||
|
|
||||||
|
while (more)
|
||||||
{
|
{
|
||||||
switch (reader.NodeType)
|
switch (reader.NodeType)
|
||||||
{
|
{
|
||||||
case XmlNodeType.Element:
|
case XmlNodeType.Element:
|
||||||
if (reader.Name == "SceneObjectPart")
|
if (reader.Name == "SceneObjectPart")
|
||||||
{
|
{
|
||||||
// reader.Read();
|
|
||||||
SceneObjectPart Part = SceneObjectPart.FromXml(reader);
|
SceneObjectPart Part = SceneObjectPart.FromXml(reader);
|
||||||
AddPart(Part);
|
AddPart(Part);
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case XmlNodeType.EndElement:
|
case XmlNodeType.EndElement:
|
||||||
|
reader.Read();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
more = !reader.EOF;
|
||||||
}
|
}
|
||||||
reader.Close();
|
reader.Close();
|
||||||
sr.Close();
|
sr.Close();
|
||||||
|
|
Loading…
Reference in New Issue