* 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
0.6.0-stable
Justin Clarke Casey 2008-03-14 16:28:33 +00:00
parent ce9c2ecac8
commit dc84f350a7
3 changed files with 27 additions and 3 deletions

View File

@ -947,6 +947,9 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="objectGroup">The group of prims which should be linked to this group</param>
public void LinkToGroup(SceneObjectGroup objectGroup)
{
if (objectGroup.RootPart.UpdateFlag > 0)
return;
SceneObjectPart linkPart = objectGroup.m_rootPart;
Vector3 oldGroupPosition =
@ -1014,6 +1017,9 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="partID"></param>
public void DelinkFromGroup(uint partID)
{
if (RootPart.UpdateFlag > 0)
return;
SceneObjectPart linkPart = GetChildPart(partID);
if (null != linkPart)

View File

@ -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;
}

View File

@ -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;