1. Updated SOP.InventorySerial and SOP.TaskInventory set functions, to make sure only local write accesses trigger
UpdateBucketSyncInfo(). 2. LinkObjectsBySync(), DelinkObjectsBySync(), and functions they call into, all updated to set properties via calling SetXXX instead of by "XXX=", so that the set operations won't trigger UpdateBucketSyncInfo().dsg
parent
6cb8b01bef
commit
e9b831b8f4
|
@ -978,6 +978,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
//save script state and stop script instances
|
||||
m_scene.EventManager.TriggerOnSymmetricSyncStop();
|
||||
}
|
||||
m_synced = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1059,11 +1060,10 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
{
|
||||
syncConnector.StartCommThreads();
|
||||
AddSyncConnector(syncConnector);
|
||||
m_synced = true;
|
||||
}
|
||||
}
|
||||
|
||||
m_synced = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -2145,8 +2145,11 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// Make sure no child prim is set for sale
|
||||
// So that, on delink, no prims are unwittingly
|
||||
// left for sale and sold off
|
||||
child.RootPart.ObjectSaleType = 0;
|
||||
child.RootPart.SalePrice = 10;
|
||||
//SYMMETRIC SYNC: need to copy value w/o trigger UpdateBucketSyncInfo
|
||||
//child.RootPart.ObjectSaleType = 0;
|
||||
//child.RootPart.SalePrice = 10;
|
||||
child.RootPart.SetObjectSaleType(0);
|
||||
child.RootPart.SetSalePrice(10);
|
||||
childGroups.Add(child);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3694,6 +3694,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
|
||||
//Similar actions with DelinkFromGroup, except that m_scene.AddNewSceneObjectBySync is called
|
||||
//!!!!!!!!!!!!!!!!!!NOTE!!!!!!!!!!!!!!!
|
||||
//All SOP properties below is set through calling SetXXX(value) instead of by "XXX=value", as such a value is being changed due to sync (
|
||||
//i.e. triggered by remote operation instead of by local operation
|
||||
public SceneObjectGroup DelinkFromGroupBySync(SceneObjectPart linkPart, bool sendEvents)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
|
@ -3714,7 +3717,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (parts.Length == 1 && RootPart != null)
|
||||
{
|
||||
// Single prim left
|
||||
RootPart.LinkNum = 0;
|
||||
//RootPart.LinkNum = 0;
|
||||
RootPart.SetLinkNum(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3722,13 +3726,18 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
SceneObjectPart part = parts[i];
|
||||
if (part.LinkNum > linkPart.LinkNum)
|
||||
part.LinkNum--;
|
||||
{
|
||||
//part.LinkNum--;
|
||||
part.SetLinkNum(part.LinkNum--);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
linkPart.ParentID = 0;
|
||||
linkPart.LinkNum = 0;
|
||||
//linkPart.ParentID = 0;
|
||||
//linkPart.LinkNum = 0;
|
||||
linkPart.SetParentID(0);
|
||||
linkPart.SetLinkNum(0);
|
||||
|
||||
if (linkPart.PhysActor != null)
|
||||
{
|
||||
|
@ -3742,11 +3751,15 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
Vector3 axPos = linkPart.OffsetPosition;
|
||||
|
||||
axPos *= parentRot;
|
||||
linkPart.OffsetPosition = new Vector3(axPos.X, axPos.Y, axPos.Z);
|
||||
linkPart.GroupPosition = AbsolutePosition + linkPart.OffsetPosition;
|
||||
linkPart.OffsetPosition = new Vector3(0, 0, 0);
|
||||
//linkPart.OffsetPosition = new Vector3(axPos.X, axPos.Y, axPos.Z);
|
||||
//linkPart.GroupPosition = AbsolutePosition + linkPart.OffsetPosition;
|
||||
//linkPart.OffsetPosition = new Vector3(0, 0, 0);
|
||||
//linkPart.RotationOffset = worldRot;
|
||||
|
||||
linkPart.RotationOffset = worldRot;
|
||||
linkPart.SetOffsetPosition(new Vector3(axPos.X, axPos.Y, axPos.Z));
|
||||
linkPart.SetGroupPosition(AbsolutePosition + linkPart.OffsetPosition);
|
||||
linkPart.SetOffsetPosition(new Vector3(0, 0, 0));
|
||||
linkPart.SetRotationOffset(worldRot);
|
||||
|
||||
SceneObjectGroup objectGroup = new SceneObjectGroup(linkPart);
|
||||
|
||||
|
|
|
@ -608,12 +608,18 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public uint InventorySerial
|
||||
{
|
||||
get { return m_inventory.Serial; }
|
||||
set { m_inventory.Serial = value; }
|
||||
set
|
||||
{
|
||||
SetInventorySerial(value);
|
||||
UpdateBucketSyncInfo("InventorySerial");
|
||||
//m_inventory.Serial = value;
|
||||
}
|
||||
}
|
||||
//SYMMETRIC SYNC: implemented to be consistent with other properties. "m_inventory.Serial" set function will trigger UpdateBucketSyncInfo if appropriate
|
||||
//SYMMETRIC SYNC: implemented to be consistent with other properties. "m_inventory.Serial" set function will trigger UpdateBucketSyncInfo,
|
||||
//hence in SetInventorySerial we will call m_inventory.SetSerial to avoid triggering UpdateBucketSyncInfo().
|
||||
public void SetInventorySerial(uint value)
|
||||
{
|
||||
m_inventory.Serial = value;
|
||||
m_inventory.SetSerial(value);
|
||||
}
|
||||
|
||||
/// <value>
|
||||
|
@ -622,12 +628,18 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public TaskInventoryDictionary TaskInventory
|
||||
{
|
||||
get { return m_inventory.Items; }
|
||||
set { m_inventory.Items = value; }
|
||||
set
|
||||
{
|
||||
//SetTaskInventory(value);
|
||||
//UpdateBucketSyncInfo("TaskInventory");
|
||||
//SYMMETRIC SYNC: "m_inventory.Items" set function will trigger UpdateBucketSyncInfo if appropriate
|
||||
m_inventory.Items = value;
|
||||
}
|
||||
}
|
||||
//SYMMETRIC SYNC: implemented to be consistent with other properties. "m_inventory.Items" set function will trigger UpdateBucketSyncInfo if appropriate
|
||||
//SYMMETRIC SYNC: implemented to be consistent with updating values of other properties (w/o triggering UpdateBucketSyncInfo);
|
||||
public void SetTaskInventory(TaskInventoryDictionary value)
|
||||
{
|
||||
m_inventory.Items = value;
|
||||
m_inventory.SetItems(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -776,7 +788,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
set
|
||||
{
|
||||
SetScriptAccessPin(value);
|
||||
//UpdateBucketSyncInfo("ScriptAccessPin");
|
||||
UpdateBucketSyncInfo("ScriptAccessPin");
|
||||
//m_scriptAccessPin = (int)value;
|
||||
}
|
||||
}
|
||||
|
@ -1317,7 +1329,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
set
|
||||
{
|
||||
SetTouchName(value);
|
||||
//UpdateBucketSyncInfo("TouchName");
|
||||
UpdateBucketSyncInfo("TouchName");
|
||||
//m_touchName = value;
|
||||
}
|
||||
}
|
||||
|
@ -1349,7 +1361,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
set
|
||||
{
|
||||
SetClickAction(value);
|
||||
UpdateBucketSyncInfo("ClickAction");
|
||||
//UpdateBucketSyncInfo("ClickAction");
|
||||
//m_clickAction = value;
|
||||
}
|
||||
}
|
||||
|
@ -1574,6 +1586,11 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
get { return _parentID; }
|
||||
set { _parentID = value; }
|
||||
}
|
||||
//SYMMETRIC SYNC: defined for consistency, for calling SetXXX in sync operations
|
||||
public void SetParentID(uint value)
|
||||
{
|
||||
_parentID = value;
|
||||
}
|
||||
|
||||
public int CreationDate
|
||||
{
|
||||
|
@ -5917,8 +5934,18 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
SetMaterial(updatedPart.Material);
|
||||
SetPassTouches(updatedPart.PassTouches);
|
||||
//RegionHandle skipped
|
||||
|
||||
|
||||
SetScriptAccessPin(updatedPart.ScriptAccessPin);
|
||||
|
||||
//SetAcceleration(updatedPart.Acceleration);
|
||||
//SetDescription(updatedPart.Description);
|
||||
//SetColor(updatedPart.Color);
|
||||
//SetText(updatedPart.Text);
|
||||
//SetSitName(updatedPart.SitName);
|
||||
|
||||
SetTouchName(updatedPart.TouchName);
|
||||
SetLinkNum(updatedPart.LinkNum);
|
||||
//SetClickAction(updatedPart.ClickAction);
|
||||
|
||||
SetShape(updatedPart.Shape);
|
||||
|
||||
m_bucketSyncInfoList[bucketName].LastUpdateTimeStamp = updatedPart.BucketSyncInfoList[bucketName].LastUpdateTimeStamp;
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
|
||||
//SYMMETRIC SYNC
|
||||
protected void SetSerial(uint value)
|
||||
public void SetSerial(uint value)
|
||||
{
|
||||
m_inventorySerial = value;
|
||||
|
||||
|
@ -100,6 +100,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
set
|
||||
{
|
||||
SetItems(value);
|
||||
m_inventorySerial++;
|
||||
m_part.UpdateBucketSyncInfo("TaskInventory");
|
||||
m_part.UpdateBucketSyncInfo("InventorySerial");
|
||||
//m_items = value;
|
||||
|
@ -107,10 +108,11 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
//SYMMETRIC SYNC
|
||||
protected void SetItems(TaskInventoryDictionary value)
|
||||
//This is inparticular for updating properties
|
||||
public void SetItems(TaskInventoryDictionary value)
|
||||
{
|
||||
m_items = value;
|
||||
m_inventorySerial++;
|
||||
//m_inventorySerial++;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue