From dc84f350a763b3c5ba5a5b8ad173fde3867f24f4 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 14 Mar 2008 16:28:33 +0000 Subject: * As yet incomplete fix for mantis #766 - terse updates broken * Currently, terse updates are back, and extremely rapid linking and delinking will only break occasionally * More work to do here --- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 8 +++++++- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 12 +++++++++++- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 10 +++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index e295f87..4c69930 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -947,6 +947,9 @@ namespace OpenSim.Region.Environment.Scenes /// The group of prims which should be linked to this group public void LinkToGroup(SceneObjectGroup objectGroup) { + if (objectGroup.RootPart.UpdateFlag > 0) + return; + SceneObjectPart linkPart = objectGroup.m_rootPart; Vector3 oldGroupPosition = @@ -1014,10 +1017,13 @@ namespace OpenSim.Region.Environment.Scenes /// public void DelinkFromGroup(uint partID) { + if (RootPart.UpdateFlag > 0) + return; + SceneObjectPart linkPart = GetChildPart(partID); if (null != linkPart) - { + { LLQuaternion worldRot = linkPart.GetWorldRotation(); // Remove the part from this object diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 060003e..4fc688a 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -1114,7 +1114,17 @@ namespace OpenSim.Region.Environment.Scenes m_parentGroup.QueueForUpdateCheck(); } - TimeStampFull = (uint) Util.UnixTimeSinceEpoch(); + int timeNow = Util.UnixTimeSinceEpoch(); + + if (timeNow == TimeStampFull) + { + TimeStampFull += 1; + } + else + { + TimeStampFull = (uint)timeNow; + } + m_updateFlag = 2; } diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index fb0e836..44d2316 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -479,8 +479,12 @@ namespace OpenSim.Region.Environment.Scenes // // If we don't do this, various events (such as linking and delinking in the same // second), will stop working properly! - if (update.LastFullUpdateTime <= part.TimeStampFull) + if (update.LastFullUpdateTime < part.TimeStampFull) { +// m_log.DebugFormat( +// "[SCENE PRESENCE]: Fully updating prim {0}, {1} - part timestamp {2}", +// part.Name, part.UUID, part.TimeStampFull); + //need to do a full update part.SendFullUpdate(ControllingClient, GenerateClientFlags(part.UUID)); @@ -494,6 +498,10 @@ namespace OpenSim.Region.Environment.Scenes } else if (update.LastTerseUpdateTime <= part.TimeStampTerse) { +// m_log.DebugFormat( +// "[SCENE PRESENCE]: Tersely updating prim {0}, {1} - part timestamp {2}", +// part.Name, part.UUID, part.TimeStampTerse); + part.SendTerseUpdate(ControllingClient); update.LastTerseUpdateTime = part.TimeStampTerse; -- cgit v1.1