In SyncOutPrimUpdates(), calling UpdatePrimSyncInfoByLocal again before calling

SendPrimPropertyUpdates, to make sure local updates are sync'ed into
RegionSyncModule's cache.
dsg
Huaiyu (Kitty) Liu 2011-05-03 14:25:05 -07:00
parent eeb09f33e3
commit 4acd23f0f9
1 changed files with 12 additions and 11 deletions

View File

@ -3684,12 +3684,18 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
foreach (KeyValuePair<UUID, HashSet<SceneObjectPartSyncProperties>> updatedPrimProperties in primPropertyUpdates)
{
UUID primUUID = updatedPrimProperties.Key;
SceneObjectPart sop = m_scene.GetSceneObjectPart(primUUID);
if (sop == null || sop.ParentGroup.IsDeleted)
continue;
else
{
HashSet<SceneObjectPartSyncProperties> updatedProperties = updatedPrimProperties.Value;
//Sync the SOP data and cached property values in PrimSyncInfoManager again
//HashSet<SceneObjectPartSyncProperties> propertiesWithSyncInfoUpdated = m_primSyncInfoManager.UpdatePrimSyncInfoByLocal(part, updatedProperties);
SendPrimPropertyUpdates(primUUID, updatedProperties);
HashSet<SceneObjectPartSyncProperties> propertiesWithSyncInfoUpdated = m_primSyncInfoManager.UpdatePrimSyncInfoByLocal(sop, new List<SceneObjectPartSyncProperties>(updatedProperties));
SendPrimPropertyUpdates(sop, updatedProperties);
}
}
// Indicate that the current batch of updates has been completed
@ -3702,13 +3708,8 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
}
}
private void SendPrimPropertyUpdates(UUID primUUID, HashSet<SceneObjectPartSyncProperties> updatedProperties)
private void SendPrimPropertyUpdates(SceneObjectPart sop, HashSet<SceneObjectPartSyncProperties> updatedProperties)
{
SceneObjectPart sop = m_scene.GetSceneObjectPart(primUUID);
if (sop == null || sop.ParentGroup.IsDeleted)
return;
OSDMap syncData = m_primSyncInfoManager.EncodePrimProperties(sop, updatedProperties);
if (syncData.Count > 0)
@ -3741,7 +3742,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
SymmetricSyncMessage syncMsg = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.UpdatedPrimProperties, OSDParser.SerializeJsonString(syncData));
SendPrimUpdateToRelevantSyncConnectors(primUUID, syncMsg);
SendPrimUpdateToRelevantSyncConnectors(sop.UUID, syncMsg);
}
}