From a4304fb9e6ec94b9a2aa70db85a68b9b102d4c33 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Thu, 13 Mar 2008 00:22:38 +0000
Subject: * Fix Mantis 761 (linking and delinking prims rapidly caused prims to
'disappear') * Root cause was that if two updates occurred in the same second
of time, the second one was never sent * Linking/delinking appears to be okay
now
---
OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 1a32460..50dc2ae 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -247,9 +247,11 @@ namespace OpenSim.Region.Environment.Scenes
public SceneObjectGroup(Scene scene, ulong regionHandle, SceneObjectPart part)
{
m_scene = scene;
+
part.SetParent(this);
part.ParentID = 0;
part.LinkNum = 0;
+
m_parts.Add(part.UUID, part);
SetPartAsRoot(part);
@@ -691,7 +693,7 @@ namespace OpenSim.Region.Environment.Scenes
#region Scheduling
///
- ///
+ /// Examine this object's parts to see if they've changed sufficiently to warrant an update
///
public override void Update()
{
@@ -703,6 +705,7 @@ namespace OpenSim.Region.Environment.Scenes
}
lastPhysGroupPos = AbsolutePosition;
}
+
if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1)
|| (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1)
|| (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1)
@@ -714,6 +717,7 @@ namespace OpenSim.Region.Environment.Scenes
}
lastPhysGroupRot = GroupRotation;
}
+
foreach (SceneObjectPart part in m_parts.Values)
{
part.SendScheduledUpdates();
@@ -737,7 +741,7 @@ namespace OpenSim.Region.Environment.Scenes
}
///
- ///
+ /// Schedule a full update for every part in this object
///
public void ScheduleGroupForFullUpdate()
{
@@ -910,6 +914,7 @@ namespace OpenSim.Region.Environment.Scenes
linkPart.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w);
linkPart.ParentID = m_rootPart.LocalId;
+
linkPart.LinkNum = m_parts.Count;
m_parts.Add(linkPart.UUID, linkPart);
@@ -1015,7 +1020,7 @@ namespace OpenSim.Region.Environment.Scenes
//m_rootPart.DoPhysicsPropertyUpdate(m_rootPart.PhysActor.IsPhysical, true);
//}
- SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart);
+ SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart);
m_scene.AddEntity(objectGroup);
@@ -1715,6 +1720,9 @@ namespace OpenSim.Region.Environment.Scenes
m_scene.EventManager.TriggerGroupGrab(UUID, offsetPos, remoteClient.AgentId);
}
+ ///
+ /// Completely delete this group and tell all the scene presences about that deletion.
+ ///
public void DeleteGroup()
{
DetachFromBackup(this);
--
cgit v1.1