aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-06-27 16:36:19 +0000
committerJustin Clarke Casey2008-06-27 16:36:19 +0000
commit9bf67201c31d531e0480e67d8a96472d0a5b0c76 (patch)
treecb3123ab6062efd7f32762b5a8a88bf1f58a35a5 /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
parentdr scofield's warning safari: hunting down those little buggers (diff)
downloadopensim-SC_OLD-9bf67201c31d531e0480e67d8a96472d0a5b0c76.zip
opensim-SC_OLD-9bf67201c31d531e0480e67d8a96472d0a5b0c76.tar.gz
opensim-SC_OLD-9bf67201c31d531e0480e67d8a96472d0a5b0c76.tar.bz2
opensim-SC_OLD-9bf67201c31d531e0480e67d8a96472d0a5b0c76.tar.xz
* Remove responsibilty for signalling scene object change from SceneObjectPart.SendFullUpdate()
* This means that we will no longer pointlessly repersist all the prims in the scene when OpenSim first starts up * This also means that force-update on the console will not trigger repersistence. * Also, in other places persistence is no longer done where it wasn't actually necessary * I think I changed the code for all instances correctly, but it's not possible that I missed some and some things which did persist properly have stopped * Please patch or mantis if this is the case
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs23
1 files changed, 19 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index b903674..74f9d6c 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -477,6 +477,7 @@ namespace OpenSim.Region.Environment.Scenes
477 newPart.LinkNum = m_parts.Count; 477 newPart.LinkNum = m_parts.Count;
478 m_parts.Add(newPart.UUID, newPart); 478 m_parts.Add(newPart.UUID, newPart);
479 SetPartAsRoot(newPart); 479 SetPartAsRoot(newPart);
480
480 // one of these is a proxy. 481 // one of these is a proxy.
481 if (shape.PCode != (byte)PCode.None && shape.PCode != (byte)PCode.ParticleSystem) 482 if (shape.PCode != (byte)PCode.None && shape.PCode != (byte)PCode.ParticleSystem)
482 AttachToBackup(); 483 AttachToBackup();
@@ -686,7 +687,12 @@ namespace OpenSim.Region.Environment.Scenes
686 m_rootPart = part; 687 m_rootPart = part;
687 } 688 }
688 689
689 690 /// <summary>
691 /// Attach this scene object to the given avatar.
692 /// </summary>
693 /// <param name="agentID"></param>
694 /// <param name="attachmentpoint"></param>
695 /// <param name="AttachOffset"></param>
690 public void AttachToAgent(LLUUID agentID, uint attachmentpoint, LLVector3 AttachOffset) 696 public void AttachToAgent(LLUUID agentID, uint attachmentpoint, LLVector3 AttachOffset)
691 { 697 {
692 ScenePresence avatar = m_scene.GetScenePresence(agentID); 698 ScenePresence avatar = m_scene.GetScenePresence(agentID);
@@ -752,6 +758,7 @@ namespace OpenSim.Region.Environment.Scenes
752 m_rootPart.SetAttachmentPoint((byte)0); 758 m_rootPart.SetAttachmentPoint((byte)0);
753 m_rootPart.m_IsAttachment = false; 759 m_rootPart.m_IsAttachment = false;
754 m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim); 760 m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim);
761 HasGroupChanged = true;
755 AttachToBackup(); 762 AttachToBackup();
756 m_rootPart.ScheduleFullUpdate(); 763 m_rootPart.ScheduleFullUpdate();
757 m_rootPart.ClearUndoState(); 764 m_rootPart.ClearUndoState();
@@ -1026,6 +1033,7 @@ namespace OpenSim.Region.Environment.Scenes
1026 lock (m_targets) 1033 lock (m_targets)
1027 m_targets.Clear(); 1034 m_targets.Clear();
1028 } 1035 }
1036
1029 ScheduleGroupForFullUpdate(); 1037 ScheduleGroupForFullUpdate();
1030 } 1038 }
1031 1039
@@ -1037,6 +1045,7 @@ namespace OpenSim.Region.Environment.Scenes
1037 (int) (color.z * 0xff)); 1045 (int) (color.z * 0xff));
1038 Text = text; 1046 Text = text;
1039 1047
1048 HasGroupChanged = true;
1040 m_rootPart.ScheduleFullUpdate(); 1049 m_rootPart.ScheduleFullUpdate();
1041 } 1050 }
1042 1051
@@ -1229,6 +1238,7 @@ namespace OpenSim.Region.Environment.Scenes
1229 1238
1230 dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); 1239 dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true);
1231 } 1240 }
1241
1232 // Now we've made a copy that replaces this one, we need to 1242 // Now we've made a copy that replaces this one, we need to
1233 // switch the owner to the person who did the copying 1243 // switch the owner to the person who did the copying
1234 // Second Life copies an object and duplicates the first one in it's place 1244 // Second Life copies an object and duplicates the first one in it's place
@@ -1257,8 +1267,9 @@ namespace OpenSim.Region.Environment.Scenes
1257 if (userExposed) 1267 if (userExposed)
1258 { 1268 {
1259 dupe.UpdateParentIDs(); 1269 dupe.UpdateParentIDs();
1260 1270 dupe.HasGroupChanged = true;
1261 dupe.AttachToBackup(); 1271 dupe.AttachToBackup();
1272
1262 ScheduleGroupForFullUpdate(); 1273 ScheduleGroupForFullUpdate();
1263 } 1274 }
1264 1275
@@ -1386,7 +1397,6 @@ namespace OpenSim.Region.Environment.Scenes
1386 part.OwnerID = cAgentID; 1397 part.OwnerID = cAgentID;
1387 part.GroupID = cGroupID; 1398 part.GroupID = cGroupID;
1388 1399
1389
1390 if (part.OwnerID != cAgentID) 1400 if (part.OwnerID != cAgentID)
1391 { 1401 {
1392 // Apply Next Owner Permissions if we're not bypassing permissions 1402 // Apply Next Owner Permissions if we're not bypassing permissions
@@ -1535,7 +1545,6 @@ namespace OpenSim.Region.Environment.Scenes
1535 /// </summary> 1545 /// </summary>
1536 public void ScheduleGroupForFullUpdate() 1546 public void ScheduleGroupForFullUpdate()
1537 { 1547 {
1538 HasGroupChanged = true;
1539 checkAtTargets(); 1548 checkAtTargets();
1540 lock (m_parts) 1549 lock (m_parts)
1541 { 1550 {
@@ -1774,6 +1783,7 @@ namespace OpenSim.Region.Environment.Scenes
1774 // The traffic caused is always going to be pretty minor, so it's not high priority 1783 // The traffic caused is always going to be pretty minor, so it's not high priority
1775 //objectGroup.DeleteGroup(); 1784 //objectGroup.DeleteGroup();
1776 1785
1786 HasGroupChanged = true;
1777 ScheduleGroupForFullUpdate(); 1787 ScheduleGroupForFullUpdate();
1778 } 1788 }
1779 1789
@@ -1834,6 +1844,7 @@ namespace OpenSim.Region.Environment.Scenes
1834 1844
1835 m_scene.AddNewSceneObject(objectGroup, true); 1845 m_scene.AddNewSceneObject(objectGroup, true);
1836 1846
1847 HasGroupChanged = true;
1837 ScheduleGroupForFullUpdate(); 1848 ScheduleGroupForFullUpdate();
1838 } 1849 }
1839 else 1850 else
@@ -2112,6 +2123,8 @@ namespace OpenSim.Region.Environment.Scenes
2112 m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor); 2123 m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor);
2113 } 2124 }
2114 //if (part.UUID != m_rootPart.UUID) 2125 //if (part.UUID != m_rootPart.UUID)
2126
2127 HasGroupChanged = true;
2115 ScheduleGroupForFullUpdate(); 2128 ScheduleGroupForFullUpdate();
2116 2129
2117 //if (part.UUID == m_rootPart.UUID) 2130 //if (part.UUID == m_rootPart.UUID)
@@ -2552,6 +2565,8 @@ namespace OpenSim.Region.Environment.Scenes
2552 { 2565 {
2553 part.SetGroup(GroupID, client); 2566 part.SetGroup(GroupID, client);
2554 } 2567 }
2568
2569 HasGroupChanged = true;
2555 } 2570 }
2556 2571
2557 ScheduleGroupForFullUpdate(); 2572 ScheduleGroupForFullUpdate();