Added code to sync each SOP's LocalFlags property. Also, in DeselectPrim, feed the list of updated properties as FullUpdate,

instead of only the IsSelected property, since SOP's Name, Description and some other properties might just have been edited
by a user.
dsg
Huaiyu (Kitty) Liu 2011-05-03 14:48:14 -07:00
parent 4afd3f6602
commit 04d406a7c8
3 changed files with 29 additions and 4 deletions

View File

@ -4299,6 +4299,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
propertyData["Value"] = OSD.FromInteger((int)((scriptEvents)LastUpdateValue));
break;
case SceneObjectPartSyncProperties.Flags:
case SceneObjectPartSyncProperties.LocalFlags:
propertyData["Value"] = OSD.FromInteger((int)((PrimFlags)LastUpdateValue));
break;
////////////////////////////
@ -4523,6 +4524,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
//propertyData["Value"] = OSD.FromInteger((int)((scriptEvents)LastUpdateValue));
break;
case SceneObjectPartSyncProperties.Flags:
case SceneObjectPartSyncProperties.LocalFlags:
PrimFlags flags = (PrimFlags)(propertyData["Value"].AsInteger());
m_lastUpdateValue = (Object)flags;
//propertyData["Value"] = OSD.FromInteger((int)((PrimFlags)LastUpdateValue));
@ -5740,6 +5742,21 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
}
}
break;
case SceneObjectPartSyncProperties.LocalFlags:
if (!part.LocalFlags.Equals(m_propertiesSyncInfo[property].LastUpdateValue))
{
if (lastUpdateByLocalTS > m_propertiesSyncInfo[property].LastUpdateTimeStamp)
{
m_propertiesSyncInfo[property].UpdateSyncInfoByLocal(lastUpdateByLocalTS, syncID, (Object)part.LocalFlags);
propertyUpdatedByLocal = true;
}
else if (lastUpdateByLocalTS < m_propertiesSyncInfo[property].LastUpdateTimeStamp)
{
//overwrite SOP's data
part.LocalFlags = (PrimFlags)m_propertiesSyncInfo[property].LastUpdateValue;
}
}
break;
case SceneObjectPartSyncProperties.Material:
if (!part.Material.Equals(m_propertiesSyncInfo[property].LastUpdateValue))
{
@ -6461,6 +6478,8 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
return (Object)part.LastOwnerID;
case SceneObjectPartSyncProperties.LinkNum:
return (Object)part.LinkNum;
case SceneObjectPartSyncProperties.LocalFlags:
return (Object)part.LocalFlags;
case SceneObjectPartSyncProperties.Material:
return (Object)part.Material;
case SceneObjectPartSyncProperties.MediaUrl:
@ -6720,6 +6739,9 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
case SceneObjectPartSyncProperties.LinkNum:
part.LinkNum = (int)pSyncInfo.LastUpdateValue;
break;
case SceneObjectPartSyncProperties.LocalFlags:
part.LocalFlags = (PrimFlags)pSyncInfo.LastUpdateValue;
break;
case SceneObjectPartSyncProperties.Material:
part.Material = (byte)pSyncInfo.LastUpdateValue;
break;

View File

@ -213,7 +213,7 @@ namespace OpenSim.Region.Framework.Scenes
isAttachment = true;
else
//part.ParentGroup.ScheduleGroupForFullUpdate();
part.ParentGroup.ScheduleGroupForFullUpdate(new List<SceneObjectPartSyncProperties>(){SceneObjectPartSyncProperties.IsSelected});
part.ParentGroup.ScheduleGroupForFullUpdate(new List<SceneObjectPartSyncProperties>(){SceneObjectPartSyncProperties.FullUpdate});
// If it's not an attachment, and we are allowed to move it,
// then we might have done so. If we moved across a parcel

View File

@ -4795,7 +4795,8 @@ namespace OpenSim.Region.Framework.Scenes
// m_log.DebugFormat(
// "[SCENE OBJECT PART]: Scheduling part {0} {1} for full update in aggregateScriptEvents()", Name, LocalId);
//ScheduleFullUpdate();
ScheduleFullUpdate(new List<SceneObjectPartSyncProperties>() { SceneObjectPartSyncProperties.Flags, SceneObjectPartSyncProperties.AggregateScriptEvents});
ScheduleFullUpdate(new List<SceneObjectPartSyncProperties>() { SceneObjectPartSyncProperties.Flags, SceneObjectPartSyncProperties.LocalFlags,
SceneObjectPartSyncProperties.AggregateScriptEvents});
}
}
@ -5218,7 +5219,8 @@ namespace OpenSim.Region.Framework.Scenes
MediaUrl,
TextureAnimation,
ParticleSystem,
//Property names below copied from PhysicsActor, they are necessary in synchronization, but not covered the above properties
//Property names below copied from PhysicsActor, they are necessary in
//synchronization, but not covered by xml serialization
//Physics properties "Velocity" is covered above
Position,
Size,
@ -5236,10 +5238,11 @@ namespace OpenSim.Region.Framework.Scenes
//Properties need to be synced, but not in xml serializations
AggregateScriptEvents,
IsAttachment,
AttachedAvatar,
AttachedPos,
AttachmentPoint,
IsAttachment,
LocalFlags,
//TODO!!!! To be handled in serialization/deserizaltion for synchronization
Sound, //This indicates any Sound related property has changed: Sound, SoundGain, SoundFlags,SoundRadius,
//Addition properties to be added here