aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2008-10-03 16:18:38 +0000
committerMelanie Thielker2008-10-03 16:18:38 +0000
commit1b2380db847513443a0641596e085757d0a77cb0 (patch)
tree1f8a48500ef26ac75bb206ee15494341f9800366
parent* refactor: make shutdown a template method in the same manner as startup, fo... (diff)
downloadopensim-SC-1b2380db847513443a0641596e085757d0a77cb0.zip
opensim-SC-1b2380db847513443a0641596e085757d0a77cb0.tar.gz
opensim-SC-1b2380db847513443a0641596e085757d0a77cb0.tar.bz2
opensim-SC-1b2380db847513443a0641596e085757d0a77cb0.tar.xz
Cause objects to be removed from the database when they go temp or get
attached. Also make sure that parcel prim counts get updated
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs5
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs13
2 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 2e28cca..5ab40cc 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -4215,5 +4215,10 @@ namespace OpenSim.Region.Environment.Scenes
4215 } 4215 }
4216 } 4216 }
4217 } 4217 }
4218
4219 public void DeleteFromStorage(UUID uuid)
4220 {
4221 m_storageManager.DataStore.RemoveObject(uuid, m_regInfo.RegionID);
4222 }
4218 } 4223 }
4219} 4224}
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 9a418b8..c779a5d 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -714,8 +714,13 @@ namespace OpenSim.Region.Environment.Scenes
714 if (avatar.IsChildAgent) return; 714 if (avatar.IsChildAgent) return;
715 715
716 DetachFromBackup(); 716 DetachFromBackup();
717 m_rootPart.AttachedAvatar = agentID;
718 717
718 // Remove from database and parcel prim count
719 //
720 m_scene.DeleteFromStorage(UUID);
721 m_scene.EventManager.TriggerParcelPrimCountTainted();
722
723 m_rootPart.AttachedAvatar = agentID;
719 724
720 if (m_rootPart.PhysActor != null) 725 if (m_rootPart.PhysActor != null)
721 { 726 {
@@ -2082,7 +2087,13 @@ namespace OpenSim.Region.Environment.Scenes
2082 SceneObjectPart selectionPart = GetChildPart(localID); 2087 SceneObjectPart selectionPart = GetChildPart(localID);
2083 2088
2084 if (data[47] != 0) // Temporary 2089 if (data[47] != 0) // Temporary
2090 {
2085 DetachFromBackup(); 2091 DetachFromBackup();
2092 // Remove from database and parcel prim count
2093 //
2094 m_scene.DeleteFromStorage(UUID);
2095 m_scene.EventManager.TriggerParcelPrimCountTainted();
2096 }
2086 2097
2087 if (selectionPart != null) 2098 if (selectionPart != null)
2088 { 2099 {