From cb90510e1631343e87f35e75af4022e3fc611103 Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 16 Aug 2007 18:22:08 +0000 Subject: 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. --- .../MonoSqliteDataStore.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite') diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs index b5e9e1c..6f12c47 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs @@ -475,7 +475,24 @@ namespace OpenSim.DataStore.MonoSqliteStorage 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 LoadObjects() -- cgit v1.1