Had to rename Rotation in SceneObjectGroup to GroupRotation to stop conflict with Rotation in entitybase (couldn't override as they are different types (LL vs Axiom) and didn't want to add new).

When you take prims into inventory (or delete them), they should now be removed from the prim datastore, so they no longer reappear in-world when you restart opensim.
afrisby
MW 2007-08-16 18:22:08 +00:00
parent 25fd8d0273
commit cb90510e16
4 changed files with 23 additions and 6 deletions

View File

@ -270,6 +270,7 @@ namespace OpenSim.Region.Environment.Scenes
remoteClient.SendInventoryItemUpdate(item); remoteClient.SendInventoryItemUpdate(item);
} }
storageManager.DataStore.RemoveObject(((SceneObjectGroup)selectedEnt).UUID);
((SceneObjectGroup)selectedEnt).DeleteGroup(); ((SceneObjectGroup)selectedEnt).DeleteGroup();
lock (Entities) lock (Entities)
@ -318,7 +319,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
SceneObjectGroup group = new SceneObjectGroup(this, this.m_regionHandle, xmlData); SceneObjectGroup group = new SceneObjectGroup(this, this.m_regionHandle, xmlData);
this.AddEntity(group); this.AddEntity(group);
group.Pos = pos; group.AbsolutePosition = pos;
} }
/// <summary> /// <summary>

View File

@ -35,12 +35,11 @@ namespace OpenSim.Region.Environment.Scenes
get { return 1; } get { return 1; }
} }
public LLQuaternion Rotation public LLQuaternion GroupRotation
{ {
get { return m_rootPart.RotationOffset; } get { return m_rootPart.RotationOffset; }
} }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
@ -538,7 +537,7 @@ namespace OpenSim.Region.Environment.Scenes
SceneObjectPart part = this.GetChildPrim(localID); SceneObjectPart part = this.GetChildPrim(localID);
if (part != null) if (part != null)
{ {
return part.PartName; return part.Name;
} }
return ""; return "";
} }

View File

@ -31,7 +31,7 @@ namespace SimpleApp
public override void UpdateMovement() public override void UpdateMovement()
{ {
UpdateGroupRotation(Rotation * m_rotationDirection); UpdateGroupRotation(GroupRotation * m_rotationDirection);
base.UpdateMovement(); base.UpdateMovement();
} }

View File

@ -475,7 +475,24 @@ namespace OpenSim.DataStore.MonoSqliteStorage
public void RemoveObject(LLUUID obj) public void RemoveObject(LLUUID obj)
{ {
// TODO: remove code DataTable prims = ds.Tables["prims"];
DataTable shapes = ds.Tables["primshapes"];
string selectExp = "SceneGroupID = '" + obj.ToString() + "'";
DataRow[] primRows = prims.Select(selectExp);
foreach (DataRow row in primRows)
{
LLUUID uuid = new LLUUID((string)row["UUID"]);
DataRow shapeRow = shapes.Rows.Find(uuid);
if (shapeRow != null)
{
shapeRow.Delete();
}
row.Delete();
}
primDa.Update(ds, "prims");
shapeDa.Update(ds, "primshapes");
} }
public List<SceneObjectGroup> LoadObjects() public List<SceneObjectGroup> LoadObjects()