Physics bucket properties (a partial list implemented) seem be synchronized fine with simple tests (less than 10 prims, scripts running, link/delink).
parent
94e433315e
commit
21a1000da6
|
@ -340,7 +340,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
|
|
||||||
foreach (string bucketName in m_propertyBucketNames)
|
foreach (string bucketName in m_propertyBucketNames)
|
||||||
{
|
{
|
||||||
if (part.HasPropertyUpdatedLocallyInGivenBucket(bucketName))
|
if (m_isSyncRelay || part.HasPropertyUpdatedLocallyInGivenBucket(bucketName))
|
||||||
{
|
{
|
||||||
lock (m_primUpdateLocks[bucketName])
|
lock (m_primUpdateLocks[bucketName])
|
||||||
{
|
{
|
||||||
|
|
|
@ -5415,8 +5415,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_parentGroup.Scene.EventManager.TriggerAggregateScriptEvents(this);
|
m_parentGroup.Scene.EventManager.TriggerAggregateScriptEvents(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Schedule updates to be sent out, if the local copy has just been updated
|
||||||
|
//(1) if we are debugging the actor with a viewer attaching to it,
|
||||||
|
//we need to schedule updates to be sent to the viewer.
|
||||||
|
//(2) or if we are a relaying node to relay updates, we need to forward the updates.
|
||||||
|
//NOTE: Passing null argument to make sure that LastUpdateTimeStamp and LastUpdateActorID of each bucket
|
||||||
|
// are kept the same as in the received copy of the object.
|
||||||
|
ScheduleFullUpdate(null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//NOTE: only touch the properties and BucketSyncInfo that is related to the given bucketName. Other properties and
|
||||||
|
//buckets may not be filled at all in "updatedPart".
|
||||||
private void PhysicsBucketUpdateProcessor(SceneObjectPart updatedPart, string bucketName)
|
private void PhysicsBucketUpdateProcessor(SceneObjectPart updatedPart, string bucketName)
|
||||||
{
|
{
|
||||||
//If needed, we could define new set functions for these properties, and cast this SOP to SOPBase to
|
//If needed, we could define new set functions for these properties, and cast this SOP to SOPBase to
|
||||||
|
@ -5450,6 +5462,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_bucketSyncInfoList[bucketName].LastUpdateActorID = updatedPart.BucketSyncInfoList[bucketName].LastUpdateActorID;
|
m_bucketSyncInfoList[bucketName].LastUpdateActorID = updatedPart.BucketSyncInfoList[bucketName].LastUpdateActorID;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Schedule updates to be sent out, if the local copy has just been updated
|
||||||
|
//(1) if we are debugging the actor with a viewer attaching to it,
|
||||||
|
//we need to schedule updates to be sent to the viewer.
|
||||||
|
//(2) or if we are a relaying node to relay updates, we need to forward the updates.
|
||||||
|
//NOTE: Passing SceneObjectPartProperties.None to make sure that LastUpdateTimeStamp and LastUpdateActorID of each bucket
|
||||||
|
// are kept the same as in the received copy of the object.
|
||||||
|
|
||||||
|
ScheduleFullUpdate(null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Initialize and set the values of timestamp and actorID for each synchronization bucket.
|
//Initialize and set the values of timestamp and actorID for each synchronization bucket.
|
||||||
|
@ -5678,7 +5700,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
Scene.ObjectUpdateResult partUpdateResult = Scene.ObjectUpdateResult.Unchanged;
|
Scene.ObjectUpdateResult partUpdateResult = Scene.ObjectUpdateResult.Unchanged;
|
||||||
|
|
||||||
if (updatedPart.BucketSyncInfoList.ContainsKey(bucketName))
|
if (!updatedPart.BucketSyncInfoList.ContainsKey(bucketName))
|
||||||
{
|
{
|
||||||
m_log.Warn("No bucket named " + bucketName + " found in the copy of updatedPart in UpdateBucketProperties");
|
m_log.Warn("No bucket named " + bucketName + " found in the copy of updatedPart in UpdateBucketProperties");
|
||||||
return partUpdateResult;
|
return partUpdateResult;
|
||||||
|
@ -5717,21 +5739,27 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ScheduleFullUpdate(List<SceneObjectPartProperties> updatedProperties)
|
public override void ScheduleFullUpdate(List<SceneObjectPartProperties> updatedProperties)
|
||||||
|
{
|
||||||
|
if (updatedProperties != null && updatedProperties.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPartProperties property in updatedProperties)
|
foreach (SceneObjectPartProperties property in updatedProperties)
|
||||||
{
|
{
|
||||||
TaintBucketSyncInfo(property);
|
TaintBucketSyncInfo(property);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
base.ScheduleFullUpdate(updatedProperties);
|
base.ScheduleFullUpdate(updatedProperties);
|
||||||
//TaintBucketSyncInfo(property);
|
//TaintBucketSyncInfo(property);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ScheduleTerseUpdate(List<SceneObjectPartProperties> updatedProperties)
|
public override void ScheduleTerseUpdate(List<SceneObjectPartProperties> updatedProperties)
|
||||||
|
{
|
||||||
|
if (updatedProperties != null && updatedProperties.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPartProperties property in updatedProperties)
|
foreach (SceneObjectPartProperties property in updatedProperties)
|
||||||
{
|
{
|
||||||
TaintBucketSyncInfo(property);
|
TaintBucketSyncInfo(property);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
base.ScheduleTerseUpdate(updatedProperties);
|
base.ScheduleTerseUpdate(updatedProperties);
|
||||||
//TaintBucketSyncInfo(property);
|
//TaintBucketSyncInfo(property);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue