mantis 8887: fix timing issue

This commit is contained in:
UbitUmarov
2021-04-15 19:54:56 +01:00
parent e08b96bfe8
commit 277c4f1433
2 changed files with 19 additions and 7 deletions

View File

@@ -341,14 +341,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
}
}
public void CopyAttachments(AgentData ad, IScenePresence sp)
public void CopyAttachments(AgentData ad, IScenePresence isp)
{
// m_log.DebugFormat("[ATTACHMENTS MODULE]: Copying attachment data into {0} in {1}", sp.Name, m_scene.Name);
ScenePresence sp = isp as ScenePresence;
if (ad.AttachmentObjects != null && ad.AttachmentObjects.Count > 0)
{
lock (sp.AttachmentsSyncLock)
DeleteAttachmentsFromScene(sp, true); // delete
lock (isp.AttachmentsSyncLock)
{
if(sp.IsDeleted)
return;
DeleteAttachmentsFromScene(isp, true); // delete
}
int i = 0;
for (int indx = 0; indx < ad.AttachmentObjects.Count; ++indx)

View File

@@ -226,8 +226,7 @@ namespace OpenSim.Region.Framework.Scenes
if (m_previusParcelUUID != UUID.Zero || checksame)
ParcelCrossCheck(m_currentParcelUUID, m_previusParcelUUID, m_currentParcelHide, m_previusParcelHide, oldhide,checksame);
}
m_log.DebugFormat("[SOP {0}] set parcel from {1} to {2}", m_scene.Name, m_previusParcelUUID, m_currentParcelUUID);
}
}
}
public void sitSOGmoved()
@@ -2300,6 +2299,16 @@ namespace OpenSim.Region.Framework.Scenes
ParcelDwellTickMS = Util.GetTimeStampMS();
m_inTransit = false;
ILandChannel landch = m_scene.LandChannel;
if (landch != null)
{
ILandObject landover = m_scene.LandChannel.GetLandObject(AbsolutePosition.X, AbsolutePosition.Y);
if (landover != null)
{
m_currentParcelHide = !landover.LandData.SeeAVs;
m_currentParcelUUID = landover.LandData.GlobalID;
}
}
// Tell the client that we're ready to send rest
if (!m_gotCrossUpdate)
@@ -2342,7 +2351,6 @@ namespace OpenSim.Region.Framework.Scenes
Scene.SendLayerData(ControllingClient);
// send initial land overlay and parcel
ILandChannel landch = m_scene.LandChannel;
if (landch != null)
landch.sendClientInitialLandInfo(client, !m_gotCrossUpdate);
}