diff options
author | MW | 2007-08-16 18:22:08 +0000 |
---|---|---|
committer | MW | 2007-08-16 18:22:08 +0000 |
commit | cb90510e1631343e87f35e75af4022e3fc611103 (patch) | |
tree | c1f0850f7ed12892a64c22331e7356bcb0dc1c09 /OpenSim | |
parent | * Introduced IScriptHost as an interface to fetching object data from scripts. (diff) | |
download | opensim-SC-cb90510e1631343e87f35e75af4022e3fc611103.zip opensim-SC-cb90510e1631343e87f35e75af4022e3fc611103.tar.gz opensim-SC-cb90510e1631343e87f35e75af4022e3fc611103.tar.bz2 opensim-SC-cb90510e1631343e87f35e75af4022e3fc611103.tar.xz |
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.
Diffstat (limited to 'OpenSim')
4 files changed, 23 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index 3f90723..f0f73b0 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |||
@@ -270,6 +270,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
270 | remoteClient.SendInventoryItemUpdate(item); | 270 | remoteClient.SendInventoryItemUpdate(item); |
271 | } | 271 | } |
272 | 272 | ||
273 | storageManager.DataStore.RemoveObject(((SceneObjectGroup)selectedEnt).UUID); | ||
273 | ((SceneObjectGroup)selectedEnt).DeleteGroup(); | 274 | ((SceneObjectGroup)selectedEnt).DeleteGroup(); |
274 | 275 | ||
275 | lock (Entities) | 276 | lock (Entities) |
@@ -318,7 +319,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
318 | { | 319 | { |
319 | SceneObjectGroup group = new SceneObjectGroup(this, this.m_regionHandle, xmlData); | 320 | SceneObjectGroup group = new SceneObjectGroup(this, this.m_regionHandle, xmlData); |
320 | this.AddEntity(group); | 321 | this.AddEntity(group); |
321 | group.Pos = pos; | 322 | group.AbsolutePosition = pos; |
322 | } | 323 | } |
323 | 324 | ||
324 | /// <summary> | 325 | /// <summary> |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index a5ad2e6..ec62509 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -35,12 +35,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
35 | get { return 1; } | 35 | get { return 1; } |
36 | } | 36 | } |
37 | 37 | ||
38 | public LLQuaternion Rotation | 38 | public LLQuaternion GroupRotation |
39 | { | 39 | { |
40 | get { return m_rootPart.RotationOffset; } | 40 | get { return m_rootPart.RotationOffset; } |
41 | } | 41 | } |
42 | 42 | ||
43 | |||
44 | /// <summary> | 43 | /// <summary> |
45 | /// | 44 | /// |
46 | /// </summary> | 45 | /// </summary> |
@@ -538,7 +537,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
538 | SceneObjectPart part = this.GetChildPrim(localID); | 537 | SceneObjectPart part = this.GetChildPrim(localID); |
539 | if (part != null) | 538 | if (part != null) |
540 | { | 539 | { |
541 | return part.PartName; | 540 | return part.Name; |
542 | } | 541 | } |
543 | return ""; | 542 | return ""; |
544 | } | 543 | } |
diff --git a/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs b/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs index 9276212..01af4f0 100644 --- a/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs +++ b/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs | |||
@@ -31,7 +31,7 @@ namespace SimpleApp | |||
31 | 31 | ||
32 | public override void UpdateMovement() | 32 | public override void UpdateMovement() |
33 | { | 33 | { |
34 | UpdateGroupRotation(Rotation * m_rotationDirection); | 34 | UpdateGroupRotation(GroupRotation * m_rotationDirection); |
35 | 35 | ||
36 | base.UpdateMovement(); | 36 | base.UpdateMovement(); |
37 | } | 37 | } |
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 | |||
475 | 475 | ||
476 | public void RemoveObject(LLUUID obj) | 476 | public void RemoveObject(LLUUID obj) |
477 | { | 477 | { |
478 | // TODO: remove code | 478 | DataTable prims = ds.Tables["prims"]; |
479 | DataTable shapes = ds.Tables["primshapes"]; | ||
480 | |||
481 | string selectExp = "SceneGroupID = '" + obj.ToString() + "'"; | ||
482 | DataRow[] primRows = prims.Select(selectExp); | ||
483 | foreach (DataRow row in primRows) | ||
484 | { | ||
485 | LLUUID uuid = new LLUUID((string)row["UUID"]); | ||
486 | DataRow shapeRow = shapes.Rows.Find(uuid); | ||
487 | if (shapeRow != null) | ||
488 | { | ||
489 | shapeRow.Delete(); | ||
490 | } | ||
491 | row.Delete(); | ||
492 | } | ||
493 | |||
494 | primDa.Update(ds, "prims"); | ||
495 | shapeDa.Update(ds, "primshapes"); | ||
479 | } | 496 | } |
480 | 497 | ||
481 | public List<SceneObjectGroup> LoadObjects() | 498 | public List<SceneObjectGroup> LoadObjects() |