diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs
index 4e5c358f37..a593538ca6 100644
--- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs
+++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs
@@ -211,7 +211,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
PupolatePropertyBuketMapByDefault();
//Pass the bucket information to SceneObjectPart.
- SceneObjectPart.InitializeBucketInfo(m_primPropertyBucketMap, m_propertyBucketDescription, m_actorID);
+ SceneObjectPart.InitializePropertyBucketInfo(m_primPropertyBucketMap, m_propertyBucketDescription, m_actorID);
}
diff --git a/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs b/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs
index 7251d57f69..bf80a32a47 100644
--- a/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs
@@ -34,7 +34,8 @@ namespace OpenSim.Region.Framework.Interfaces
{
void Reset();
void Close();
- void QueuePartForUpdate(SceneObjectPart part);
+ //void QueuePartForUpdate(SceneObjectPart part);
+ void QueuePartForUpdate(SceneObjectPartBase part);
void SendPrimUpdates();
}
}
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index d75cad2931..e58f5e881c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -2148,8 +2148,15 @@ namespace OpenSim.Region.Framework.Scenes
//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);
+ //child.RootPart.SetObjectSaleType(0);
+ //child.RootPart.SetSalePrice(10);
+ //child.RootPart.SetProperty("ObjectSaleType", 0);
+ //child.RootPart.SetProperty("SalePrice", 10);
+
+ //casting SOP to SOPBase to make sure we call SOPBase.Property set function, not the SOP.Property set function
+ SceneObjectPartBase rootPart = (SceneObjectPartBase)child.RootPart;
+ rootPart.ObjectSaleType = 0;
+ rootPart.SalePrice = 10;
childGroups.Add(child);
}
}
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 74ac1f2171..80a93e7540 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -294,11 +294,12 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_rootPart.GroupPosition; }
set
{
+ /*
SetAbsolutePosition(value);
SceneObjectPart[] parts = m_parts.GetArray();
for (int i = 0; i < parts.Length; i++)
parts[i].UpdateBucketSyncInfo("GroupPosition");
- /*
+ */
Vector3 val = value;
//REGION SYNC touched
@@ -333,7 +334,7 @@ namespace OpenSim.Region.Framework.Scenes
//m_rootPart.GroupPosition.Z);
//m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor);
//}
- * */
+
}
}
public void SetAbsolutePosition(Vector3 value)
@@ -364,8 +365,8 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectPart[] parts = m_parts.GetArray();
for (int i = 0; i < parts.Length; i++)
{
- //parts[i].GroupPosition = val;
- parts[i].SetGroupPosition(val);
+ parts[i].GroupPosition = val;
+ //parts[i].SetGroupPosition(val);
}
}
@@ -3749,12 +3750,13 @@ namespace OpenSim.Region.Framework.Scenes
//!!!!!!!!!!!!!!!!!!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)
+ public SceneObjectGroup DelinkFromGroupBySync(SceneObjectPart delinkPart, bool sendEvents)
{
-// m_log.DebugFormat(
-// "[SCENE OBJECT GROUP]: Delinking part {0}, {1} from group with root part {2}, {3}",
-// linkPart.Name, linkPart.UUID, RootPart.Name, RootPart.UUID);
-
+ // m_log.DebugFormat(
+ // "[SCENE OBJECT GROUP]: Delinking part {0}, {1} from group with root part {2}, {3}",
+ // linkPart.Name, linkPart.UUID, RootPart.Name, RootPart.UUID);
+
+ SceneObjectPartBase linkPart = (SceneObjectPartBase)delinkPart;
linkPart.ClearUndoState();
Quaternion worldRot = linkPart.GetWorldRotation();
@@ -3770,27 +3772,27 @@ namespace OpenSim.Region.Framework.Scenes
{
// Single prim left
//RootPart.LinkNum = 0;
- RootPart.SetLinkNum(0);
+ //RootPart.SetProperty("LinkNum", 0);
+ ((SceneObjectPartBase)RootPart).LinkNum = 0;
}
else
{
for (int i = 0; i < parts.Length; i++)
{
- SceneObjectPart part = parts[i];
+ SceneObjectPartBase part = (SceneObjectPartBase)parts[i];
if (part.LinkNum > linkPart.LinkNum)
{
- //part.LinkNum--;
- int linkNum = part.LinkNum - 1;
- part.SetLinkNum(linkNum);
+ part.LinkNum--;
+ //int linkNum = part.LinkNum - 1;
+ //part.SetProperty("LinkNum", linkNum);
}
}
}
}
- //linkPart.ParentID = 0;
- //linkPart.LinkNum = 0;
- linkPart.SetParentID(0);
- linkPart.SetLinkNum(0);
+ linkPart.ParentID = 0; //ParentID is a value set only locally and ignored in synchronization, so no need to call SetProperty to set its value
+ linkPart.LinkNum = 0;
+ //linkPart.SetParentID(0);
if (linkPart.PhysActor != null)
{
@@ -3804,19 +3806,23 @@ 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.RotationOffset = worldRot;
+ 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.SetOffsetPosition(new Vector3(axPos.X, axPos.Y, axPos.Z));
- linkPart.SetGroupPosition(AbsolutePosition + linkPart.OffsetPosition);
- linkPart.SetOffsetPosition(new Vector3(0, 0, 0));
- linkPart.SetRotationOffset(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);
+ //linkPart.SetProperty("OffsetPosition", new Vector3(axPos.X, axPos.Y, axPos.Z));
+ //linkPart.SetProperty("GroupPosition", AbsolutePosition + linkPart.OffsetPosition);
+ //linkPart.SetProperty("OffsetPosition", new Vector3(0, 0, 0));
+ //linkPart.SetProperty("RotationOffset", worldRot);
//SceneObjectGroup objectGroup = new SceneObjectGroup(linkPart);
bool newGroupBySync = true;
- SceneObjectGroup objectGroup = new SceneObjectGroup(linkPart, newGroupBySync);
+ SceneObjectGroup objectGroup = new SceneObjectGroup(delinkPart, newGroupBySync);
m_scene.AddNewSceneObjectBySync(objectGroup, true);
@@ -3833,7 +3839,7 @@ namespace OpenSim.Region.Framework.Scenes
}
///
- /// Set a part to act as the root part for this scene object, in which SetLinkNum() is called instead of "LinkNum=".
+ /// Set a part to act as the root part for this scene object, in which SetProperty("LinkNum",) is called instead of "LinkNum=".
///
///
public void SetRootPartBySync(SceneObjectPart part)
@@ -3845,7 +3851,7 @@ namespace OpenSim.Region.Framework.Scenes
m_rootPart = part;
if (!IsAttachment)
part.ParentID = 0;
- part.SetLinkNum(0);
+ part.SetProperty("LinkNum", 0);
m_parts.Add(m_rootPart.UUID, m_rootPart);
}
@@ -3872,36 +3878,40 @@ namespace OpenSim.Region.Framework.Scenes
public void LinkToGroupBySync(SceneObjectGroup objectGroup)
{
- SceneObjectPart linkPart = objectGroup.m_rootPart;
-
+ SceneObjectPartBase linkPart = (SceneObjectPartBase)objectGroup.m_rootPart;
+
Vector3 oldGroupPosition = linkPart.GroupPosition;
Quaternion oldRootRotation = linkPart.RotationOffset;
- //linkPart.OffsetPosition = linkPart.GroupPosition - AbsolutePosition;
- //linkPart.GroupPosition = AbsolutePosition;
- linkPart.SetOffsetPosition(linkPart.GroupPosition - AbsolutePosition);
- linkPart.SetGroupPosition(AbsolutePosition);
+ linkPart.OffsetPosition = linkPart.GroupPosition - AbsolutePosition;
+ linkPart.GroupPosition = AbsolutePosition;
+ //linkPart.SetOffsetPosition(linkPart.GroupPosition - AbsolutePosition);
+ //linkPart.SetGroupPosition(AbsolutePosition);
+ //linkPart.SetProperty("OffsetPosition", linkPart.GroupPosition - AbsolutePosition);
+ //linkPart.SetProperty("GroupPosition", AbsolutePosition);
Vector3 axPos = linkPart.OffsetPosition;
Quaternion parentRot = m_rootPart.RotationOffset;
axPos *= Quaternion.Inverse(parentRot);
- //linkPart.OffsetPosition = axPos;
- linkPart.SetOffsetPosition(axPos);
+ linkPart.OffsetPosition = axPos;
+ //linkPart.SetOffsetPosition(axPos);
+ //linkPart.SetProperty("OffsetPosition", axPos);
Quaternion oldRot = linkPart.RotationOffset;
Quaternion newRot = Quaternion.Inverse(parentRot) * oldRot;
- //linkPart.RotationOffset = newRot;
- linkPart.SetRotationOffset(newRot);
+ linkPart.RotationOffset = newRot;
+ //linkPart.SetRotationOffset(newRot);
+ //linkPart.SetProperty("RotationOffset", newRot);
//ParentID is only valid locally, so remote value is ignored and no syncinfo will be modified
linkPart.ParentID = m_rootPart.LocalId;
if (m_rootPart.LinkNum == 0)
- //m_rootPart.LinkNum = 1;
- m_rootPart.SetLinkNum(1);
+ ((SceneObjectPartBase)m_rootPart).LinkNum = 1;
+ //m_rootPart.SetProperty("LinkNum",1);
lock (m_parts.SyncRoot)
{
- m_parts.Add(linkPart.UUID, linkPart);
+ m_parts.Add(linkPart.UUID, (SceneObjectPart) linkPart);
// Insert in terms of link numbers, the new links
// before the current ones (with the exception of
@@ -3909,17 +3919,17 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectPart[] parts = m_parts.GetArray();
for (int i = 0; i < parts.Length; i++)
{
- SceneObjectPart part = parts[i];
+ SceneObjectPartBase part = (SceneObjectPartBase)parts[i];
if (part.LinkNum != 1)
{
// Don't update root prim link number
- //part.LinkNum += objectGroup.PrimCount;
- part.SetLinkNum(objectGroup.PrimCount);
+ part.LinkNum += objectGroup.PrimCount;
+ //part.SetProperty("LinkNum",objectGroup.PrimCount);
}
}
- //linkPart.LinkNum = 2;
- linkPart.SetLinkNum(2);
+ linkPart.LinkNum = 2;
+ //linkPart.SetProperty("LinkNum",2);
linkPart.SetParent(this);
linkPart.CreateSelected = true;
@@ -3963,49 +3973,57 @@ namespace OpenSim.Region.Framework.Scenes
}
- private void LinkNonRootPartBySync(SceneObjectPart part, Vector3 oldGroupPosition, Quaternion oldGroupRotation, int linkNum)
+ private void LinkNonRootPartBySync(SceneObjectPart linkPart, Vector3 oldGroupPosition, Quaternion oldGroupRotation, int linkNum)
{
Quaternion parentRot = oldGroupRotation;
- Quaternion oldRot = part.RotationOffset;
+ Quaternion oldRot = linkPart.RotationOffset;
Quaternion worldRot = parentRot * oldRot;
parentRot = oldGroupRotation;
- Vector3 axPos = part.OffsetPosition;
+ Vector3 axPos = linkPart.OffsetPosition;
+ SceneObjectPartBase part = (SceneObjectPartBase)linkPart;
axPos *= parentRot;
- //part.OffsetPosition = axPos;
- //part.GroupPosition = oldGroupPosition + part.OffsetPosition;
- //part.OffsetPosition = Vector3.Zero;
- //part.RotationOffset = worldRot;
- part.SetOffsetPosition(axPos);
- part.SetGroupPosition(oldGroupPosition + part.OffsetPosition);
- part.SetOffsetPosition(Vector3.Zero);
- part.SetRotationOffset(worldRot);
+ part.OffsetPosition = axPos;
+ part.GroupPosition = oldGroupPosition + part.OffsetPosition;
+ part.OffsetPosition = Vector3.Zero;
+ part.RotationOffset = worldRot;
+ //part.SetOffsetPosition(axPos);
+ //part.SetGroupPosition(oldGroupPosition + part.OffsetPosition);
+ //part.SetOffsetPosition(Vector3.Zero);
+ //part.SetRotationOffset(worldRot);
+ //part.SetProperty("OffsetPosition", axPos);
+ //part.SetProperty("GroupPosition", oldGroupPosition + part.OffsetPosition);
+ //part.SetProperty("OffsetPosition", Vector3.Zero);
+ //part.SetProperty("RotationOffset", worldRot);
part.SetParent(this);
part.ParentID = m_rootPart.LocalId;
- m_parts.Add(part.UUID, part);
+ m_parts.Add(part.UUID, linkPart);
- //part.LinkNum = linkNum;
- part.SetLinkNum(linkNum);
+ part.LinkNum = linkNum;
+ //part.SetProperty("LinkNum",linkNum);
- //part.OffsetPosition = part.GroupPosition - AbsolutePosition;
- part.SetOffsetPosition(part.GroupPosition - AbsolutePosition);
+ part.OffsetPosition = part.GroupPosition - AbsolutePosition;
+ //part.SetOffsetPosition(part.GroupPosition - AbsolutePosition);
+ //part.SetProperty("OffsetPosition", part.GroupPosition - AbsolutePosition);
Quaternion rootRotation = m_rootPart.RotationOffset;
Vector3 pos = part.OffsetPosition;
pos *= Quaternion.Inverse(rootRotation);
- //part.OffsetPosition = pos;
- part.SetOffsetPosition(pos);
+ part.OffsetPosition = pos;
+ //part.SetOffsetPosition(pos);
+ //part.SetProperty("OffsetPosition", pos);
parentRot = m_rootPart.RotationOffset;
oldRot = part.RotationOffset;
Quaternion newRot = Quaternion.Inverse(parentRot) * oldRot;
- //part.RotationOffset = newRot;
- part.SetRotationOffset(newRot);
+ part.RotationOffset = newRot;
+ //part.SetRotationOffset(newRot);
+ //part.SetProperty("RotationOffset", newRot);
}
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 489b94a80a..d2929fe0a8 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -107,66 +107,15 @@ namespace OpenSim.Region.Framework.Scenes
#endregion Enumerations
- //SYMMETRIC SYNC
-
- //Information for concurrency control of one bucket of prim proproperties.
- public class BucketSyncInfo
- {
- private long m_lastUpdateTimeStamp;
- private string m_lastUpdateActorID;
- //lock for concurrent updates of the timestamp and actorID.
- private Object m_updateLock = new Object();
- private string m_bucketName;
-
- public long LastUpdateTimeStamp
- {
- get { return m_lastUpdateTimeStamp; }
- set { m_lastUpdateTimeStamp = value; }
- }
-
- public string LastUpdateActorID
- {
- get { return m_lastUpdateActorID; }
- set { m_lastUpdateActorID = value; }
- }
-
- public string BucketName
- {
- get { return m_bucketName; }
- }
-
- public BucketSyncInfo(string bucketName)
- {
- m_bucketName = bucketName;
- }
-
- public BucketSyncInfo(long timeStamp, string actorID, string bucketName)
- {
- m_lastUpdateTimeStamp = timeStamp;
- m_lastUpdateActorID = actorID;
- m_bucketName = bucketName;
- }
-
- public void UpdateSyncInfo(long timeStamp, string actorID)
- {
- lock (m_updateLock)
- {
- m_lastUpdateTimeStamp = timeStamp;
- m_lastUpdateActorID = actorID;
- }
- }
-
- }
- //end of SYMMETRIC SYNC
-
- public class SceneObjectPart : IScriptHost, ISceneEntity
+ //public class SceneObjectPart : IScriptHost, ISceneEntity
+ public abstract class SceneObjectPartBase : IScriptHost, ISceneEntity
{
///
/// Denote all sides of the prim
///
public const int ALL_SIDES = -1;
- private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+ protected static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
///
/// Is this sop a root part?
@@ -187,15 +136,9 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_allowedDrop; }
set
{
- //m_allowedDrop = value;
- SetAllowedDrop(value);
- UpdateBucketSyncInfo("AllowedDrop");
+ m_allowedDrop = value;
}
}
- public void SetAllowedDrop(bool value)
- {
- m_allowedDrop = value;
- }
public bool DIE_AT_EDGE;
@@ -327,7 +270,8 @@ namespace OpenSim.Region.Framework.Scenes
{
get { return m_inventory; }
}
- protected SceneObjectPartInventory m_inventory;
+ //protected SceneObjectPartInventory m_inventory;
+ protected SceneObjectPartInventoryBase m_inventory;
public bool Undoing;
@@ -335,24 +279,7 @@ namespace OpenSim.Region.Framework.Scenes
public bool IgnoreUndoUpdate = false;
- //SYMMETRIC SYNC
- //public PrimFlags LocalFlags;
- private PrimFlags m_localFlags;
- public PrimFlags LocalFlags
- {
- get { return m_localFlags; }
- set
- {
- SetLocalFlags(value);
- UpdateBucketSyncInfo("LocalFlags");
- }
- }
- public void SetLocalFlags(PrimFlags value)
- {
- m_localFlags = value;
- }
-
-
+ public PrimFlags LocalFlags;
private float m_damage = -1.0f;
private byte[] m_TextureAnimation;
private byte m_clickAction;
@@ -435,14 +362,16 @@ namespace OpenSim.Region.Framework.Scenes
///
/// No arg constructor called by region restore db code
///
- public SceneObjectPart()
+ //public SceneObjectPart()
+ public SceneObjectPartBase()
{
// It's not necessary to persist this
m_TextureAnimation = Utils.EmptyBytes;
m_particleSystem = Utils.EmptyBytes;
Rezzed = DateTime.UtcNow;
- m_inventory = new SceneObjectPartInventory(this);
+ //m_inventory = new SceneObjectPartInventory(this);
+ m_inventory = new SceneObjectPartInventoryBase(this);
}
///
@@ -453,7 +382,8 @@ namespace OpenSim.Region.Framework.Scenes
///
///
///
- public SceneObjectPart(
+ //public SceneObjectPart(
+ public SceneObjectPartBase(
UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition,
Quaternion rotationOffset, Vector3 offsetPosition)
{
@@ -492,7 +422,8 @@ namespace OpenSim.Region.Framework.Scenes
TrimPermissions();
//m_undo = new UndoStack(ParentGroup.GetSceneMaxUndo());
- m_inventory = new SceneObjectPartInventory(this);
+ //m_inventory = new SceneObjectPartInventory(this);
+ m_inventory = new SceneObjectPartInventoryBase(this);
}
#endregion Constructors
@@ -528,16 +459,9 @@ namespace OpenSim.Region.Framework.Scenes
}
set
{
- SetCreatorID(value);
- UpdateBucketSyncInfo("CreatorID");
- //_creatorID = value;
+ _creatorID = value;
}
}
- //SYMMETRIC SYNC
- public void SetCreatorID(UUID value)
- {
- _creatorID = value;
- }
///
/// Data about the creator in the form profile_url;name
@@ -545,17 +469,7 @@ namespace OpenSim.Region.Framework.Scenes
public string CreatorData
{
get { return m_creatorData; }
- set
- {
- SetCreatorData(value);
- UpdateBucketSyncInfo("CreatorData");
- //m_creatorData = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetCreatorData(string value)
- {
- m_creatorData = value;
+ set { m_creatorData = value; }
}
///
@@ -625,18 +539,7 @@ namespace OpenSim.Region.Framework.Scenes
public uint InventorySerial
{
get { return m_inventory.Serial; }
- 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,
- //hence in SetInventorySerial we will call m_inventory.SetSerial to avoid triggering UpdateBucketSyncInfo().
- public void SetInventorySerial(uint value)
- {
- m_inventory.SetSerial(value);
+ set { m_inventory.Serial = value; }
}
///
@@ -645,18 +548,7 @@ namespace OpenSim.Region.Framework.Scenes
public TaskInventoryDictionary TaskInventory
{
get { return m_inventory.Items; }
- 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 updating values of other properties (w/o triggering UpdateBucketSyncInfo);
- public void SetTaskInventory(TaskInventoryDictionary value)
- {
- m_inventory.SetItems(value);
+ set { m_inventory.Items = value; }
}
///
@@ -692,25 +584,12 @@ namespace OpenSim.Region.Framework.Scenes
{
get { return m_name; }
set
- {
- SetName(value);
- UpdateBucketSyncInfo("Name");
- /*
+ {
m_name = value;
if (PhysActor != null)
{
PhysActor.SOPName = value;
}
- * */
- }
- }
- //SYMMETRIC SYNC
- public void SetName(string value)
- {
- m_name = value;
- if (PhysActor != null)
- {
- PhysActor.SOPName = value;
}
}
@@ -719,49 +598,24 @@ namespace OpenSim.Region.Framework.Scenes
get { return (byte) m_material; }
set
{
- SetMaterial(value);
- UpdateBucketSyncInfo("Material");
- /*
m_material = (Material)value;
if (PhysActor != null)
{
PhysActor.SetMaterial((int)value);
}
- * */
}
}
- //SYMMETRIC SYNC
- public void SetMaterial(byte value)
- {
- m_material = (Material)value;
- if (PhysActor != null)
- {
- PhysActor.SetMaterial((int)value);
- }
- }
-
public bool PassTouches
{
get { return m_passTouches; }
set
{
- SetPassTouches(value);
- UpdateBucketSyncInfo("PassTouches");
- /*
m_passTouches = value;
if (ParentGroup != null)
ParentGroup.HasGroupChanged = true;
- * */
}
}
- //SYMMETRIC SYNC
- public void SetPassTouches(bool value)
- {
- m_passTouches = value;
- if (ParentGroup != null)
- ParentGroup.HasGroupChanged = true;
- }
@@ -804,20 +658,8 @@ namespace OpenSim.Region.Framework.Scenes
public int ScriptAccessPin
{
get { return m_scriptAccessPin; }
- set
- {
- SetScriptAccessPin(value);
- UpdateBucketSyncInfo("ScriptAccessPin");
- //m_scriptAccessPin = (int)value;
- }
+ set { m_scriptAccessPin = (int)value; }
}
- //SYMMETRIC SYNC
- public void SetScriptAccessPin(int value)
- {
- m_scriptAccessPin = (int)value;
- }
-
-
private SceneObjectPart m_PlaySoundMasterPrim = null;
public SceneObjectPart PlaySoundMasterPrim
{
@@ -850,34 +692,14 @@ namespace OpenSim.Region.Framework.Scenes
public Byte[] TextureAnimation
{
get { return m_TextureAnimation; }
- set
- {
- SetTextureAnimation(value);
- UpdateBucketSyncInfo("TextureAnimation");
- //m_TextureAnimation = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetTextureAnimation(Byte[] value)
- {
- m_TextureAnimation = value;
+ set { m_TextureAnimation = value; }
}
public Byte[] ParticleSystem
{
get { return m_particleSystem; }
- set
- {
- SetParticleSystem(value);
- UpdateBucketSyncInfo("ParticleSystem");
- //m_particleSystem = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetParticleSystem(Byte[] value)
- {
- m_particleSystem = value;
+ set { m_particleSystem = value; }
}
@@ -926,11 +748,6 @@ namespace OpenSim.Region.Framework.Scenes
}
set
{
- SetGroupPosition(value);
- UpdateBucketSyncInfo("GroupPosition");
-
- /*
- //Legacy Opensim code
m_groupPosition = value;
PhysicsActor actor = PhysActor;
@@ -971,63 +788,14 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
- */
}
}
- //SYMMETRIC SYNC
- public void SetGroupPosition(Vector3 value)
- {
- m_groupPosition = value;
-
- PhysicsActor actor = PhysActor;
- if (actor != null)
- {
- try
- {
- // Root prim actually goes at Position
- if (_parentID == 0)
- {
- actor.Position = value;
- }
- else
- {
- // To move the child prim in respect to the group position and rotation we have to calculate
- actor.Position = GetWorldPosition();
- actor.Orientation = GetWorldRotation();
- }
-
- // Tell the physics engines that this prim changed.
- m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
- }
- catch (Exception e)
- {
- m_log.Error("[SCENEOBJECTPART]: GROUP POSITION. " + e.Message);
- }
- }
-
- // TODO if we decide to do sitting in a more SL compatible way (multiple avatars per prim), this has to be fixed, too
- if (m_sitTargetAvatar != UUID.Zero)
- {
- if (m_parentGroup != null) // TODO can there be a SOP without a SOG?
- {
- ScenePresence avatar;
- if (m_parentGroup.Scene.TryGetScenePresence(m_sitTargetAvatar, out avatar))
- {
- avatar.ParentPosition = GetWorldPosition();
- }
- }
- }
- }
-
public Vector3 OffsetPosition
{
get { return m_offsetPosition; }
set
{
- SetOffsetPosition(value);
- UpdateBucketSyncInfo("OffsetPosition");
- /*
StoreUndoState();
m_offsetPosition = value;
@@ -1043,26 +811,6 @@ namespace OpenSim.Region.Framework.Scenes
m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
}
}
- * */
- }
- }
- //SYMMETRIC SYNC
- public void SetOffsetPosition(Vector3 value)
- {
- StoreUndoState();
- m_offsetPosition = value;
-
- if (ParentGroup != null && !ParentGroup.IsDeleted)
- {
- PhysicsActor actor = PhysActor;
- if (_parentID != 0 && actor != null)
- {
- actor.Position = GetWorldPosition();
- actor.Orientation = GetWorldRotation();
-
- // Tell the physics engines that this prim changed.
- m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
- }
}
}
@@ -1104,9 +852,6 @@ namespace OpenSim.Region.Framework.Scenes
set
{
- SetRotationOffset(value);
- UpdateBucketSyncInfo("RotationOffset");
- /*
StoreUndoState();
m_rotationOffset = value;
@@ -1136,43 +881,9 @@ namespace OpenSim.Region.Framework.Scenes
m_log.Error("[SCENEOBJECTPART]: ROTATIONOFFSET" + ex.Message);
}
}
- * */
}
}
- //SYMMETRIC SYNC
- public void SetRotationOffset(Quaternion value)
- {
- StoreUndoState();
- m_rotationOffset = value;
-
- PhysicsActor actor = PhysActor;
- if (actor != null)
- {
- try
- {
- // Root prim gets value directly
- if (_parentID == 0)
- {
- actor.Orientation = value;
- //m_log.Info("[PART]: RO1:" + actor.Orientation.ToString());
- }
- else
- {
- // Child prim we have to calculate it's world rotationwel
- Quaternion resultingrotation = GetWorldRotation();
- actor.Orientation = resultingrotation;
- //m_log.Info("[PART]: RO2:" + actor.Orientation.ToString());
- }
- m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
- //}
- }
- catch (Exception ex)
- {
- m_log.Error("[SCENEOBJECTPART]: ROTATIONOFFSET" + ex.Message);
- }
- }
- }
///
public Vector3 Velocity
@@ -1193,9 +904,6 @@ namespace OpenSim.Region.Framework.Scenes
set
{
- SetVelocity(value);
- UpdateBucketSyncInfo("Velocity");
- /*
m_velocity = value;
PhysicsActor actor = PhysActor;
@@ -1207,22 +915,6 @@ namespace OpenSim.Region.Framework.Scenes
m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
}
}
- * */
- }
- }
- //SYMMETRIC SYNC
- public void SetVelocity(Vector3 value)
- {
- m_velocity = value;
-
- PhysicsActor actor = PhysActor;
- if (actor != null)
- {
- if (actor.IsPhysical)
- {
- actor.Velocity = value;
- m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
- }
}
}
@@ -1238,35 +930,14 @@ namespace OpenSim.Region.Framework.Scenes
}
return m_angularVelocity;
}
- set
- {
- SetAngularVelocity(value);
- UpdateBucketSyncInfo("AngularVelocity");
- //m_angularVelocity = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetAngularVelocity(Vector3 value)
- {
- m_angularVelocity = value;
+ set { m_angularVelocity = value; }
}
///
public Vector3 Acceleration
{
get { return m_acceleration; }
- set
- {
- SetAcceleration(value);
-
- UpdateBucketSyncInfo("Acceleration");
- //m_acceleration = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetAcceleration(Vector3 value)
- {
- m_acceleration = value;
+ set { m_acceleration = value; }
}
public string Description
@@ -1274,26 +945,12 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_description; }
set
{
- SetDescription(value);
- UpdateBucketSyncInfo("Description");
- /*
m_description = value;
PhysicsActor actor = PhysActor;
if (actor != null)
{
actor.SOPDescription = value;
}
- * */
- }
- }
- //SYMMETRIC SYNC
- public void SetDescription(string value)
- {
- m_description = value;
- PhysicsActor actor = PhysActor;
- if (actor != null)
- {
- actor.SOPDescription = value;
}
}
@@ -1305,9 +962,7 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_color; }
set
{
- SetColor(value);
- UpdateBucketSyncInfo("Color");
- //m_color = value;
+ m_color = value;
/* ScheduleFullUpdate() need not be called b/c after
* setting the color, the text will be set, so then
@@ -1315,11 +970,6 @@ namespace OpenSim.Region.Framework.Scenes
//ScheduleFullUpdate();
}
}
- //SYMMETRIC SYNC
- public void SetColor(Color value)
- {
- m_color = value;
- }
public string Text
{
@@ -1334,65 +984,27 @@ namespace OpenSim.Region.Framework.Scenes
}
set
{
- SetText(value, false);
- UpdateBucketSyncInfo("Text");
- //m_text = value;
+ m_text = value;
}
}
- //SYMMETRIC SYNC
- //SetText(string) has been defined, defined it as a different interface, the 2nd argument is not really useful
- public void SetText(string value, bool bySync)
- {
- m_text = value;
- }
public string SitName
{
get { return m_sitName; }
- set
- {
- SetSitName(value);
- UpdateBucketSyncInfo("SitName");
- //m_sitName = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetSitName(string value)
- {
- m_sitName = value;
+ set { m_sitName = value; }
}
public string TouchName
{
get { return m_touchName; }
- set
- {
- SetTouchName(value);
- UpdateBucketSyncInfo("TouchName");
- //m_touchName = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetTouchName(string value)
- {
- m_touchName = value;
+ set { m_touchName = value; }
}
public int LinkNum
{
get { return m_linkNum; }
- set
- {
- SetLinkNum(value);
- UpdateBucketSyncInfo("LinkNum");
- //m_linkNum = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetLinkNum(int value)
- {
- m_linkNum = value;
+ set { m_linkNum = value; }
}
public byte ClickAction
@@ -1400,31 +1012,14 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_clickAction; }
set
{
- SetClickAction(value);
- UpdateBucketSyncInfo("ClickAction");
- //m_clickAction = value;
+ m_clickAction = value;
}
}
- //SYMMETRIC SYNC
- public void SetClickAction(byte value)
- {
- m_clickAction = value;
- }
public PrimitiveBaseShape Shape
{
get { return m_shape; }
- set
- {
- SetShape(value);
- UpdateBucketSyncInfo("Shape");
- //m_shape = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetShape(PrimitiveBaseShape value)
- {
- m_shape = value;
+ set { m_shape = value; }
}
public Vector3 Scale
@@ -1432,9 +1027,6 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_shape.Scale; }
set
{
- SetScale(value);
- UpdateBucketSyncInfo("Scale");
- /*
StoreUndoState();
if (m_shape != null)
{
@@ -1454,33 +1046,8 @@ namespace OpenSim.Region.Framework.Scenes
}
}
TriggerScriptChangedEvent(Changed.SCALE);
- * */
}
}
- //SYMMETRIC SYNC
- public void SetScale(Vector3 value)
- {
- StoreUndoState();
- if (m_shape != null)
- {
- m_shape.Scale = value;
-
- PhysicsActor actor = PhysActor;
- if (actor != null && m_parentGroup != null)
- {
- if (m_parentGroup.Scene != null)
- {
- if (m_parentGroup.Scene.PhysicsScene != null)
- {
- actor.Size = m_shape.Scale;
- m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
- }
- }
- }
- }
- TriggerScriptChangedEvent(Changed.SCALE);
- }
-
public byte UpdateFlag
{
@@ -1501,24 +1068,12 @@ namespace OpenSim.Region.Framework.Scenes
set
{
- SetMediaUrl(value);
- UpdateBucketSyncInfo("MediaUrl");
- /*
m_mediaUrl = value;
if (ParentGroup != null)
ParentGroup.HasGroupChanged = true;
- * */
}
}
- //SYMMETRIC SYNC
- public void SetMediaUrl(string value)
- {
- m_mediaUrl = value;
-
- if (ParentGroup != null)
- ParentGroup.HasGroupChanged = true;
- }
public bool CreateSelected
@@ -1558,33 +1113,14 @@ namespace OpenSim.Region.Framework.Scenes
public Quaternion SitTargetOrientation
{
get { return m_sitTargetOrientation; }
- set
- {
- SetSitTargetOrientation(value);
- UpdateBucketSyncInfo("SitTargetOrientation");
- //m_sitTargetOrientation = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetSitTargetOrientation(Quaternion value)
- {
- m_sitTargetOrientation = value;
+ set { m_sitTargetOrientation = value; }
}
+
public Vector3 SitTargetPosition
{
get { return m_sitTargetPosition; }
- set
- {
- SetSitTargetPosition(value);
- UpdateBucketSyncInfo("SitTargetPosition");
- //m_sitTargetPosition = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetSitTargetPosition(Vector3 value)
- {
- m_sitTargetPosition = value;
+ set { m_sitTargetPosition = value; }
}
// This sort of sucks, but I'm adding these in to make some of
@@ -1592,17 +1128,7 @@ namespace OpenSim.Region.Framework.Scenes
public Vector3 SitTargetPositionLL
{
get { return new Vector3(m_sitTargetPosition.X, m_sitTargetPosition.Y,m_sitTargetPosition.Z); }
- set
- {
- SetSitTargetPosition(value);
- UpdateBucketSyncInfo("SitTargetPositionLL");
- //m_sitTargetPosition = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetSitTargetPositionLL(Vector3 value)
- {
- m_sitTargetPosition = value;
+ set { m_sitTargetPosition = value; }
}
public Quaternion SitTargetOrientationLL
@@ -1617,17 +1143,7 @@ namespace OpenSim.Region.Framework.Scenes
);
}
- set
- {
- SetSitTargetOrientation(new Quaternion(value.X, value.Y, value.Z, value.W));
- UpdateBucketSyncInfo("SitTargetOrientationLL");
- //m_sitTargetOrientation = new Quaternion(value.X, value.Y, value.Z, value.W);
- }
- }
- //SYMMETRIC SYNC
- public void SetSitTargetOrientationLL(Quaternion value)
- {
- m_sitTargetOrientation = value;
+ set { m_sitTargetOrientation = new Quaternion(value.X, value.Y, value.Z, value.W); }
}
public bool Stopped
@@ -1648,218 +1164,83 @@ 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
{
get { return _creationDate; }
- set
- {
- SetCreationDate(value);
- UpdateBucketSyncInfo("CreationDate");
- //_creationDate = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetCreationDate(int value)
- {
- _creationDate = value;
+ set { _creationDate = value; }
}
public uint Category
{
get { return _category; }
- set
- {
- SetCategory(value);
- UpdateBucketSyncInfo("Category");
- //_category = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetCategory(uint value)
- {
- _category = value;
+ set { _category = value; }
}
public int SalePrice
{
get { return _salePrice; }
- set
- {
- SetSalePrice(value);
- UpdateBucketSyncInfo("SalePrice");
- //_salePrice = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetSalePrice(int value)
- {
- _salePrice = value;
+ set { _salePrice = value; }
}
public byte ObjectSaleType
{
get { return _objectSaleType; }
- set
- {
- SetObjectSaleType(value);
- UpdateBucketSyncInfo("ObjectSaleType");
- //_objectSaleType = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetObjectSaleType(byte value)
- {
- _objectSaleType = value;
+ set { _objectSaleType = value; }
}
public int OwnershipCost
{
get { return _ownershipCost; }
- set
- {
- SetOwnershipCost(value);
- UpdateBucketSyncInfo("OwnershipCost");
- // _ownershipCost = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetOwnershipCost(int value)
- {
- _ownershipCost = value;
+ set { _ownershipCost = value; }
}
public UUID GroupID
{
get { return _groupID; }
- set
- {
- SetGroupID(value);
- UpdateBucketSyncInfo("GroupID");
- //_groupID = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetGroupID(UUID value)
- {
- _groupID = value;
+ set { _groupID = value; }
}
public UUID OwnerID
{
get { return _ownerID; }
- set
- {
- SetOwnerID(value);
- UpdateBucketSyncInfo("OwnerID");
- // _ownerID = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetOwnerID(UUID value)
- {
- _ownerID = value;
+ set { _ownerID = value; }
}
public UUID LastOwnerID
{
get { return _lastOwnerID; }
- set
- {
- SetLastOwnerID(value);
- UpdateBucketSyncInfo("LastOwnerID");
- //_lastOwnerID = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetLastOwnerID(UUID value)
- {
- _lastOwnerID = value;
+ set { _lastOwnerID = value; }
}
public uint BaseMask
{
get { return _baseMask; }
- set
- {
- SetBaseMask(value);
- UpdateBucketSyncInfo("BaseMask");
- //_baseMask = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetBaseMask(uint value)
- {
- _baseMask = value;
+ set { _baseMask = value; }
}
public uint OwnerMask
{
get { return _ownerMask; }
- set
- {
- SetOwnerMask(value);
- UpdateBucketSyncInfo("OwnerMask");
- //_ownerMask = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetOwnerMask(uint value)
- {
- _ownerMask = value;
+ set { _ownerMask = value; }
}
public uint GroupMask
{
get { return _groupMask; }
- set
- {
- SetGroupMask(value);
- UpdateBucketSyncInfo("GroupMask");
- //_groupMask = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetGroupMask(uint value)
- {
- _groupMask = value;
+ set { _groupMask = value; }
}
public uint EveryoneMask
{
get { return _everyoneMask; }
- set
- {
- SetEveryoneMask(value);
- UpdateBucketSyncInfo("EveryoneMask");
- //_everyoneMask = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetEveryoneMask(uint value)
- {
- _everyoneMask = value;
+ set { _everyoneMask = value; }
}
public uint NextOwnerMask
{
get { return _nextOwnerMask; }
- set
- {
- SetNextOwnerMask(value);
- UpdateBucketSyncInfo("NextOwnerMask");
- //_nextOwnerMask = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetNextOwnerMask(uint value)
- {
- _nextOwnerMask = value;
+ set { _nextOwnerMask = value; }
}
///
@@ -1870,18 +1251,11 @@ namespace OpenSim.Region.Framework.Scenes
{
get { return _flags; }
set
- {
- SetFlags(value);
- UpdateBucketSyncInfo("Flags");
+ {
// m_log.DebugFormat("[SOP]: Setting flags for {0} {1} to {2}", UUID, Name, value);
- //_flags = value;
+ _flags = value;
}
}
- //SYMMETRIC SYNC
- public void SetFlags(PrimFlags value)
- {
- _flags = value;
- }
public UUID SitTargetAvatar
@@ -1930,35 +1304,15 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_collisionSound; }
set
{
- SetCollisionSound(value);
- UpdateBucketSyncInfo("CollisionSound");
- //m_collisionSound = value;
+ m_collisionSound = value;
aggregateScriptEvents();
}
}
- //SYMMETRIC SYNC
- //CollisionSound is a special case. We won't call aggregateScriptEvents inside SetCollisionSound,
- //so that when RegionSynModule triggers SOP.UpdateAllProperties, it calls SetCollisionSound
- public void SetCollisionSound(UUID value)
- {
- m_collisionSound = value;
- }
-
public float CollisionSoundVolume
{
get { return m_collisionSoundVolume; }
- set
- {
- SetCollisionSoundVolume(value);
- UpdateBucketSyncInfo("CollisionSoundVolume");
- //m_collisionSoundVolume = value;
- }
- }
- //SYMMETRIC SYNC
- public void SetCollisionSoundVolume(float value)
- {
- m_collisionSoundVolume = value;
+ set { m_collisionSoundVolume = value; }
}
#endregion Public Properties with only Get
@@ -2055,7 +1409,7 @@ namespace OpenSim.Region.Framework.Scenes
});
// REGION SYNC
if (m_parentGroup.Scene.IsSyncedServer())
- m_parentGroup.Scene.RegionSyncServerModule.QueuePartForUpdate(this);
+ m_parentGroup.Scene.RegionSyncServerModule.QueuePartForUpdate((SceneObjectPart)this);
}
///
@@ -2063,21 +1417,17 @@ namespace OpenSim.Region.Framework.Scenes
///
public void AddFullUpdateToAvatar(ScenePresence presence)
{
- presence.SceneViewer.QueuePartForUpdate(this);
+ presence.SceneViewer.QueuePartForUpdate((SceneObjectPart)this);
}
public void AddNewParticleSystem(Primitive.ParticleSystem pSystem)
{
- //SYMMETRIC SYNC
- //m_particleSystem = pSystem.GetBytes();
- ParticleSystem = pSystem.GetBytes();
+ m_particleSystem = pSystem.GetBytes();
}
public void RemoveParticleSystem()
{
- //SYMMETRIC SYNC
- //m_particleSystem = new byte[0];
- ParticleSystem = new byte[0];
+ m_particleSystem = new byte[0];
}
/// Terse updates
@@ -2089,12 +1439,12 @@ namespace OpenSim.Region.Framework.Scenes
});
// REGION SYNC
if (m_parentGroup.Scene.IsSyncedServer())
- m_parentGroup.Scene.RegionSyncServerModule.QueuePartForUpdate(this);
+ m_parentGroup.Scene.RegionSyncServerModule.QueuePartForUpdate((SceneObjectPart)this);
}
public void AddTerseUpdateToAvatar(ScenePresence presence)
{
- presence.SceneViewer.QueuePartForUpdate(this);
+ presence.SceneViewer.QueuePartForUpdate((SceneObjectPart)this);
}
public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim)
@@ -2114,9 +1464,7 @@ namespace OpenSim.Region.Framework.Scenes
Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4);
Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8);
- //m_TextureAnimation = data;
- //SYMMETRIC SYNC
- TextureAnimation = data;
+ m_TextureAnimation = data;
}
public void AdjustSoundGain(double volume)
@@ -2370,7 +1718,7 @@ namespace OpenSim.Region.Framework.Scenes
dupe.DoPhysicsPropertyUpdate(UsePhysics, true);
}
- ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, this, userExposed);
+ ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, (SceneObjectPart) this, userExposed);
// m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID);
@@ -3492,10 +2840,6 @@ namespace OpenSim.Region.Framework.Scenes
ParentGroup.HasGroupChanged = true;
ScheduleFullUpdate();
-
- //SYMMETRIC SYNC
- //Make sure we record down the timestamp info for synchronization purpose
- UpdateBucketSyncInfo("Scale");
}
public void RotLookAt(Quaternion target, float strength, float damping)
@@ -3652,10 +2996,7 @@ namespace OpenSim.Region.Framework.Scenes
// Tricks physics engine into thinking we've changed the part shape.
PrimitiveBaseShape m_newshape = m_shape.Copy();
PhysActor.Shape = m_newshape;
-
- //SYMMETRIC SYNC
- //m_shape = m_newshape;
- Shape = m_newshape;
+ m_shape = m_newshape;
m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
}
@@ -3824,7 +3165,7 @@ namespace OpenSim.Region.Framework.Scenes
//SYMMETRIC SYNC
if (m_parentGroup.Scene.RegionSyncModule == null)
return;
- m_parentGroup.Scene.RegionSyncModule.QueueSceneObjectPartForUpdate(this);
+ m_parentGroup.Scene.RegionSyncModule.QueueSceneObjectPartForUpdate((SceneObjectPart)this);
//end of SYMMETRIC SYNC
}
@@ -3881,7 +3222,7 @@ namespace OpenSim.Region.Framework.Scenes
soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle, radius);
else
soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius);
- ParentGroup.PlaySoundMasterPrim = this;
+ ParentGroup.PlaySoundMasterPrim = (SceneObjectPart)this;
ownerID = _ownerID;
objectID = ParentGroup.RootPart.UUID;
parentID = GetRootPartUUID();
@@ -3908,7 +3249,7 @@ namespace OpenSim.Region.Framework.Scenes
}
else
{
- ParentGroup.PlaySoundSlavePrims.Add(this);
+ ParentGroup.PlaySoundSlavePrims.Add((SceneObjectPart)this);
}
}
else
@@ -4224,10 +3565,7 @@ namespace OpenSim.Region.Framework.Scenes
public void SetGroup(UUID groupID, IClientAPI client)
{
- //SYMMETRIC SYNC
- //_groupID = groupID;
- GroupID = groupID;
-
+ _groupID = groupID;
if (client != null)
GetProperties(client);
m_updateFlag = 2;
@@ -4289,9 +3627,7 @@ namespace OpenSim.Region.Framework.Scenes
///
public void SetText(string text)
{
- //Text = text;
- //SYMMETRIC SYNC: make set property calls consistent
- m_text = text;
+ Text = text;
ParentGroup.HasGroupChanged = true;
ScheduleFullUpdate();
@@ -4342,14 +3678,14 @@ namespace OpenSim.Region.Framework.Scenes
UndoState last = m_undo.Peek();
if (last != null)
{
- if (last.Compare(this))
+ if (last.Compare((SceneObjectPart)this))
return;
}
}
if (m_parentGroup.GetSceneMaxUndo() > 0)
{
- UndoState nUndo = new UndoState(this);
+ UndoState nUndo = new UndoState((SceneObjectPart)this);
m_undo.Push(nUndo);
}
@@ -4802,7 +4138,7 @@ namespace OpenSim.Region.Framework.Scenes
///
public void ToXml(XmlTextWriter xmlWriter)
{
- SceneObjectSerializer.SOPToXml2(xmlWriter, this, new Dictionary());
+ SceneObjectSerializer.SOPToXml2(xmlWriter, (SceneObjectPart)this, new Dictionary());
}
public void TriggerScriptChangedEvent(Changed val)
@@ -4829,12 +4165,12 @@ namespace OpenSim.Region.Framework.Scenes
UndoState nUndo = null;
if (m_parentGroup.GetSceneMaxUndo() > 0)
{
- nUndo = new UndoState(this);
+ nUndo = new UndoState((SceneObjectPart)this);
}
UndoState goback = m_undo.Pop();
if (goback != null)
{
- goback.PlaybackState(this);
+ goback.PlaybackState((SceneObjectPart)this);
if (nUndo != null)
m_redo.Push(nUndo);
}
@@ -4848,13 +4184,13 @@ namespace OpenSim.Region.Framework.Scenes
{
if (m_parentGroup.GetSceneMaxUndo() > 0)
{
- UndoState nUndo = new UndoState(this);
+ UndoState nUndo = new UndoState((SceneObjectPart)this);
m_undo.Push(nUndo);
}
UndoState gofwd = m_redo.Pop();
if (gofwd != null)
- gofwd.PlayfwdState(this);
+ gofwd.PlayfwdState((SceneObjectPart)this);
}
}
@@ -4872,9 +4208,6 @@ namespace OpenSim.Region.Framework.Scenes
ParentGroup.HasGroupChanged = true;
ScheduleFullUpdate();
-
- //SYMMETRIC SYNC
- UpdateBucketSyncInfo("Shape");
}
public void UpdateGroupPosition(Vector3 pos)
@@ -4938,36 +4271,24 @@ namespace OpenSim.Region.Framework.Scenes
case 1:
if (god)
{
- //SYMMETRIC SYNC
- //_baseMask = ApplyMask(_baseMask, set, mask);
- BaseMask = ApplyMask(_baseMask, set, mask);
+ _baseMask = ApplyMask(_baseMask, set, mask);
Inventory.ApplyGodPermissions(_baseMask);
-
}
break;
case 2:
- //SYMMETRIC SYNC
- //_ownerMask = ApplyMask(_ownerMask, set, mask) &
- // baseMask;
- OwnerMask = ApplyMask(_ownerMask, set, mask) & baseMask;
+ _ownerMask = ApplyMask(_ownerMask, set, mask) &
+ baseMask;
break;
case 4:
- //SYMMETRIC SYNC
- //_groupMask = ApplyMask(_groupMask, set, mask) &
- // baseMask;
- GroupMask = ApplyMask(_groupMask, set, mask) &
+ _groupMask = ApplyMask(_groupMask, set, mask) &
baseMask;
break;
case 8:
- //SYMMETRIC SYNC
- //_everyoneMask = ApplyMask(_everyoneMask, set, mask) &
- // baseMask;
- EveryoneMask = ApplyMask(_everyoneMask, set, mask) &
+ _everyoneMask = ApplyMask(_everyoneMask, set, mask) &
baseMask;
break;
case 16:
- //SYMMETRIC SYNC
_nextOwnerMask = ApplyMask(_nextOwnerMask, set, mask) &
baseMask;
// Prevent the client from creating no mod, no copy
@@ -4975,9 +4296,7 @@ namespace OpenSim.Region.Framework.Scenes
if ((_nextOwnerMask & (uint)PermissionMask.Copy) == 0)
_nextOwnerMask |= (uint)PermissionMask.Transfer;
- //_nextOwnerMask |= (uint)PermissionMask.Move;
- NextOwnerMask = _nextOwnerMask | (uint)PermissionMask.Move;
-
+ _nextOwnerMask |= (uint)PermissionMask.Move;
break;
}
@@ -5278,9 +4597,6 @@ namespace OpenSim.Region.Framework.Scenes
ParentGroup.HasGroupChanged = true;
TriggerScriptChangedEvent(Changed.SHAPE);
ScheduleFullUpdate();
-
- //SYMMETRIC SYNC
- UpdateBucketSyncInfo("Shape");
}
///
@@ -5328,9 +4644,6 @@ namespace OpenSim.Region.Framework.Scenes
//ParentGroup.ScheduleGroupForFullUpdate();
//This is sparta
ScheduleFullUpdate();
-
- //SYMMETRIC SYNC
- UpdateBucketSyncInfo("Shape");
}
public void aggregateScriptEvents()
@@ -5639,7 +4952,6 @@ namespace OpenSim.Region.Framework.Scenes
{
m_lastUpdateTimeStamp = time;
}
-
public void SetLastUpdateActorID()
{
@@ -5653,19 +4965,17 @@ namespace OpenSim.Region.Framework.Scenes
}
}
-
private Object m_SyncInfoLock = new Object();
public void SyncInfoUpdate(long timeStamp, string actorID)
{
//update timestamp and actorID atomically
-
lock (m_SyncInfoLock)
{
UpdateTimestamp(timeStamp);
m_lastUpdateActorID = actorID;
}
-
}
+
public void SyncInfoUpdate()
{
@@ -5677,7 +4987,7 @@ namespace OpenSim.Region.Framework.Scenes
SyncInfoUpdate(DateTime.Now.Ticks, m_parentGroup.Scene.GetSyncActorID());
}
}
- * */
+ */
//The list of each prim's properties. This is the list of properties that matter in synchronizing prim copies on different actors.
//This list is created based on properties included in the serialization/deserialization process (see SceneObjectSerializer()) and the
@@ -5703,8 +5013,8 @@ namespace OpenSim.Region.Framework.Scenes
"RotationOffset",
"Velocity",
"AngularVelocity",
- "Acceleration", //This is the property maintained in SOP. SOP and PA read/write their own local copies of acceleration, so we distinguish the copies
- //"SOP_Acceleration", //SOP and PA read/write their own local copies of acceleration, so we distinguish the copies
+ //"Acceleration",
+ "SOP_Acceleration", //SOP and PA read/write their own local copies of acceleration, so we distinguish the copies
"Description",
"Color",
"Text",
@@ -5734,7 +5044,6 @@ namespace OpenSim.Region.Framework.Scenes
"EveryoneMask",
"NextOwnerMask",
"Flags",
- "LocalFlags",
"CollisionSound",
"CollisionSoundVolume",
"MediaUrl",
@@ -5756,12 +5065,12 @@ namespace OpenSim.Region.Framework.Scenes
- /*
+
private Object propertyUpdateLock = new Object();
+ /*
//!!!!!! -- TODO:
//!!!!!! -- We should call UpdateXXX functions to update each property, cause some of such updates involves sanity checking.
-
public Scene.ObjectUpdateResult UpdateAllProperties(SceneObjectPart updatedPart)
{
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -5884,32 +5193,18 @@ namespace OpenSim.Region.Framework.Scenes
return partUpdateResult;
}
-
- * */
-
-
+ * */
private bool UpdateCollisionSound(UUID updatedCollisionSound)
{
if (this.CollisionSound != updatedCollisionSound)
{
- //m_collisionSound = updatedCollisionSound;
- SetCollisionSound(updatedCollisionSound);
+ m_collisionSound = updatedCollisionSound;
return true;
}
return false;
}
- public string DebugObjectPartProperties()
- {
- string debugMsg = "UUID " + UUID + ", Name " + Name + ", localID " + LocalId;
- debugMsg += ", parentID " + ParentID + ", parentUUID " + ParentUUID;
- foreach (KeyValuePair pair in m_bucketSyncInfoList)
- {
- debugMsg += ", Bucket " + pair.Key + ": TimeStamp - " + pair.Value.LastUpdateTimeStamp + ", ActorID - " + pair.Value.LastUpdateActorID;
- }
- return debugMsg;
- }
///
/// Schedules this prim for a full update, without changing the timestamp or actorID (info on when and who modified any property).
@@ -5946,6 +5241,78 @@ namespace OpenSim.Region.Framework.Scenes
}
+
+
+ #endregion
+
+ }
+
+ //SYMMETRIC SYNC
+
+ //Information for concurrency control of one bucket of prim proproperties.
+ public class BucketSyncInfo
+ {
+ private long m_lastUpdateTimeStamp;
+ private string m_lastUpdateActorID;
+ //lock for concurrent updates of the timestamp and actorID.
+ private Object m_updateLock = new Object();
+ private string m_bucketName;
+
+ public long LastUpdateTimeStamp
+ {
+ get { return m_lastUpdateTimeStamp; }
+ set { m_lastUpdateTimeStamp = value; }
+ }
+
+ public string LastUpdateActorID
+ {
+ get { return m_lastUpdateActorID; }
+ set { m_lastUpdateActorID = value; }
+ }
+
+ public string BucketName
+ {
+ get { return m_bucketName; }
+ }
+
+ public BucketSyncInfo(string bucketName)
+ {
+ m_bucketName = bucketName;
+ }
+
+ public BucketSyncInfo(long timeStamp, string actorID, string bucketName)
+ {
+ m_lastUpdateTimeStamp = timeStamp;
+ m_lastUpdateActorID = actorID;
+ m_bucketName = bucketName;
+ }
+
+ public void UpdateSyncInfo(long timeStamp, string actorID)
+ {
+ lock (m_updateLock)
+ {
+ m_lastUpdateTimeStamp = timeStamp;
+ m_lastUpdateActorID = actorID;
+ }
+ }
+
+ }
+
+
+ public class SceneObjectPart : SceneObjectPartBase
+ {
+ public SceneObjectPart()
+ : base()
+ {
+ }
+
+ public SceneObjectPart(
+ UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition,
+ Quaternion rotationOffset, Vector3 offsetPosition)
+ : base(ownerID, shape, groupPosition, rotationOffset, offsetPosition)
+ {
+ }
+
//The following variables should be initialized when this SceneObjectPart is added into the local Scene.
//private List SynchronizeUpdatesToScene = null;
//public List BucketSyncInfoList
@@ -5975,7 +5342,7 @@ namespace OpenSim.Region.Framework.Scenes
//property set functions will be called and might trigger UpdateBucketSyncInfo() if not guarded carefully.
private bool m_syncEnabled = false;
- public static void InitializeBucketInfo(Dictionary propertyBucketMap, List bucketNames, string actorID)
+ public static void InitializePropertyBucketInfo(Dictionary propertyBucketMap, List bucketNames, string actorID)
{
m_primPropertyBucketMap = propertyBucketMap;
m_propertyBucketNames = bucketNames;
@@ -5985,6 +5352,17 @@ namespace OpenSim.Region.Framework.Scenes
//RegisterBucketUpdateProcessor();
}
+ public string DebugObjectPartProperties()
+ {
+ string debugMsg = "UUID " + UUID + ", Name " + Name + ", localID " + LocalId;
+ debugMsg += ", parentID " + ParentID + ", parentUUID " + ParentUUID;
+ foreach (KeyValuePair pair in m_bucketSyncInfoList)
+ {
+ debugMsg += ", Bucket " + pair.Key + ": TimeStamp - " + pair.Value.LastUpdateTimeStamp + ", ActorID - " + pair.Value.LastUpdateActorID;
+ }
+ return debugMsg;
+ }
+
///
/// Link each bucket with the function that applies updates to properties in the bucket upon receiving sync messages.
/// This is the "hard-coded" part in the property-buckets implementation. When new buckets are implemented,
@@ -5992,7 +5370,6 @@ namespace OpenSim.Region.Framework.Scenes
///
//private static void RegisterBucketUpdateProcessor()
private void RegisterBucketUpdateProcessor()
-
{
foreach (string bucketName in m_propertyBucketNames)
{
@@ -6015,66 +5392,7 @@ namespace OpenSim.Region.Framework.Scenes
{
lock (m_bucketUpdateLocks[bucketName])
{
- SetAllowedDrop(updatedPart.AllowedDrop);
- SetCreatorID(updatedPart.CreatorID);
- SetCreatorData(updatedPart.CreatorData);
- //FolderID skipped
- SetInventorySerial(updatedPart.InventorySerial);
- SetTaskInventory(updatedPart.TaskInventory);
- //UUID skipped
- //LocalId skipped
- SetName(updatedPart.Name);
- 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);
- //UpdateFlag skipped: It's a flag meanful locally, especially in scheduling updates to viewers.
- //Only in one place will it cause updating some "last" variables (see SendScheduledUpdates).
- SetSitTargetOrientation(updatedPart.SitTargetOrientation);
- SetSitTargetPosition(updatedPart.SitTargetPosition);
- SetSitTargetPositionLL(updatedPart.SitTargetPositionLL);
- SetSitTargetOrientationLL(updatedPart.SitTargetOrientationLL);
- //ParentID skipped, the value is assigned locally and only meaningful locally (LinkObjects and LinkObjectsBySync will set it appropriately)\
- SetCreationDate(updatedPart.CreationDate);
- SetCategory(updatedPart.Category);
- SetSalePrice(updatedPart.SalePrice);
- SetObjectSaleType(updatedPart.ObjectSaleType);
- SetOwnershipCost(updatedPart.OwnershipCost);
- SetGroupID(updatedPart.GroupID);
- SetOwnerID(updatedPart.OwnerID);
- SetLastOwnerID(updatedPart.LastOwnerID);
- SetBaseMask(updatedPart.BaseMask);
- SetOwnerMask(updatedPart.OwnerMask);
- SetGroupMask(updatedPart.GroupMask);
- SetEveryoneMask(updatedPart.EveryoneMask);
- SetNextOwnerMask(updatedPart.NextOwnerMask);
- SetFlags(updatedPart.Flags);
- //Treat CollisionSound in a different way, so that if any property needs to be changed due to aggregateScriptEvents(), timestamp can be updated after
- //the current copying-property-values-from-remote-sync-message is done.
- bool collisionSoundUpdated = UpdateCollisionSound(updatedPart.CollisionSound);
- SetCollisionSoundVolume(updatedPart.CollisionSoundVolume);
- SetMediaUrl(updatedPart.MediaUrl);
- SetTextureAnimation(updatedPart.TextureAnimation);
- SetParticleSystem(updatedPart.ParticleSystem);
-
- m_bucketSyncInfoList[bucketName].LastUpdateTimeStamp = updatedPart.BucketSyncInfoList[bucketName].LastUpdateTimeStamp;
- m_bucketSyncInfoList[bucketName].LastUpdateActorID = updatedPart.BucketSyncInfoList[bucketName].LastUpdateActorID;
-
- if (collisionSoundUpdated)
- {
- //If the local actor is Script Engine, it will catch this evnet and trigger aggregateScriptEvents()
- m_parentGroup.Scene.EventManager.TriggerAggregateScriptEvents(this);
- }
}
}
@@ -6082,29 +5400,6 @@ namespace OpenSim.Region.Framework.Scenes
{
lock (m_bucketUpdateLocks[bucketName])
{
- SetGroupPosition(updatedPart.GroupPosition);
- SetOffsetPosition(updatedPart.OffsetPosition);
- SetScale(updatedPart.Scale);
- SetVelocity(updatedPart.Velocity);
- SetAngularVelocity(updatedPart.AngularVelocity);
- SetRotationOffset(updatedPart.RotationOffset);
-
- //properties in Physics bucket whose update processors are in PhysicsActor
- /*
- "Position":
- "Size":
- "Force":
- "RotationalVelocity":
- "PA_Acceleration":
- "Torque":
- "Orientation":
- "IsPhysical":
- "Flying":
- "Buoyancy":
- * */
-
- m_bucketSyncInfoList[bucketName].LastUpdateTimeStamp = updatedPart.BucketSyncInfoList[bucketName].LastUpdateTimeStamp;
- m_bucketSyncInfoList[bucketName].LastUpdateActorID = updatedPart.BucketSyncInfoList[bucketName].LastUpdateActorID;
}
}
@@ -6154,7 +5449,7 @@ namespace OpenSim.Region.Framework.Scenes
/// Name of the property. Make sure the spelling is consistent with what are defined in PropertyList
public void UpdateBucketSyncInfo(string propertyName)
{
- if (m_syncEnabled && m_bucketSyncInfoList != null && m_bucketSyncInfoList.Count>0)
+ if (m_syncEnabled && m_bucketSyncInfoList != null && m_bucketSyncInfoList.Count > 0)
{
//int bucketIndex = m_primPropertyBucketMap[propertyName];
string bucketName = m_primPropertyBucketMap[propertyName];
@@ -6170,7 +5465,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
-
+
public Scene.ObjectUpdateResult UpdateAllProperties(SceneObjectPart updatedPart)
{
@@ -6222,16 +5517,26 @@ namespace OpenSim.Region.Framework.Scenes
m_log.Warn("No update processor for property bucket " + bucketName);
}
-
+
}
return partUpdateResult;
}
-
- //private void UpdateBucketProperties(string bucketDescription,
- #endregion
+ public void SetProperty(string pName, object value)
+ {
+ switch (pName)
+ {
+ case "LinkNum":
+ base.LinkNum = (int)value;
+ break;
+ default:
+ break;
+ }
+ }
}
+
+ //end of SYMMETRIC SYNC
}
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 3a87dda99f..1d1e66c826 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -41,7 +41,8 @@ using OpenSim.Region.Framework.Scenes.Serialization;
namespace OpenSim.Region.Framework.Scenes
{
- public class SceneObjectPartInventory : IEntityInventory
+ //public class SceneObjectPartInventory : IEntityInventory
+ public class SceneObjectPartInventoryBase : IEntityInventory
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -52,7 +53,8 @@ namespace OpenSim.Region.Framework.Scenes
///
/// The part to which the inventory belongs.
///
- private SceneObjectPart m_part;
+ //private SceneObjectPart m_part;
+ private SceneObjectPartBase m_part;
///
/// Serial count for inventory file , used to tell if inventory has changed
@@ -76,19 +78,7 @@ namespace OpenSim.Region.Framework.Scenes
protected internal uint Serial
{
get { return m_inventorySerial; }
- set
- {
- SetSerial(value);
- m_part.UpdateBucketSyncInfo("InventorySerial");
- //m_inventorySerial = value;
- }
- }
-
- //SYMMETRIC SYNC
- public void SetSerial(uint value)
- {
- m_inventorySerial = value;
-
+ set { m_inventorySerial = value; }
}
///
@@ -99,21 +89,10 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_items; }
set
{
- SetItems(value);
+ m_items = value;
m_inventorySerial++;
- m_part.UpdateBucketSyncInfo("TaskInventory");
- m_part.UpdateBucketSyncInfo("InventorySerial");
- //m_items = value;
- //m_inventorySerial++;
}
}
- //SYMMETRIC SYNC
- //This is inparticular for updating properties
- public void SetItems(TaskInventoryDictionary value)
- {
- m_items = value;
- //m_inventorySerial++;
- }
///
/// Constructor
@@ -121,7 +100,8 @@ namespace OpenSim.Region.Framework.Scenes
///
/// A
///
- public SceneObjectPartInventory(SceneObjectPart part)
+ //public SceneObjectPartInventory(SceneObjectPart part)
+ public SceneObjectPartInventoryBase(SceneObjectPartBase part)
{
m_part = part;
}
@@ -159,10 +139,6 @@ namespace OpenSim.Region.Framework.Scenes
item.ResetIDs(m_part.UUID);
m_items.Add(item.ItemID, item);
}
-
- //SYMMETRIC SYNC
- //No need to trigger UpdateBucketSyncInfo, as callers eventually will call SOG.AttachToScene and init BucketSyncInfo
-
}
}
@@ -179,9 +155,6 @@ namespace OpenSim.Region.Framework.Scenes
item.ParentID = m_part.UUID;
Items.Add(item.ItemID, item);
}
-
- //SYMMETRIC SYNC
- //No need to trigger UpdateBucketSyncInfo, this is called only when SOP.UUID is written, which is assumed not to change after being created.
}
}
@@ -212,9 +185,6 @@ namespace OpenSim.Region.Framework.Scenes
item.PermsGranter = UUID.Zero;
}
}
-
- //SYMMETRIC SYNC
- m_part.UpdateBucketSyncInfo("TaskInventory");
}
///
@@ -246,12 +216,6 @@ namespace OpenSim.Region.Framework.Scenes
if (groupID != item.GroupID)
item.GroupID = groupID;
}
-
- //SYMMETRIC SYNC: need to test if we need to take different actions when this is attachment or not
- //if (!m_part.ParentGroup.RootPart.IsAttachment)
- //{
- m_part.UpdateBucketSyncInfo("TaskInventory");
-
}
///
@@ -582,11 +546,7 @@ namespace OpenSim.Region.Framework.Scenes
m_part.ParentGroup.HasGroupChanged = true;
//SYMMETRIC SYNC: add ScheduleFullUpdate to enable synchronization across actors
- //m_part.ScheduleFullUpdate();
-
- //SYMMETRIC SYNC
- m_part.UpdateBucketSyncInfo("TaskInventory");
- m_part.UpdateBucketSyncInfo("InventorySerial"); //m_inventorySerial is also changed,
+ m_part.ScheduleFullUpdate();
}
///
@@ -607,9 +567,6 @@ namespace OpenSim.Region.Framework.Scenes
}
m_inventorySerial++;
}
-
- //SYMMETRIC SYNC: no UpdateBucketSyncInfo called here, since this function is called by loading objects from DB, and UpdateBucketSyncInfo
- //will be called after all objects are loaded.
}
///
@@ -768,10 +725,6 @@ namespace OpenSim.Region.Framework.Scenes
HasInventoryChanged = true;
m_part.ParentGroup.HasGroupChanged = true;
}
-
- //SYMMETRIC SYNC
- m_part.UpdateBucketSyncInfo("TaskInventory");
- m_part.UpdateBucketSyncInfo("InventorySerial");
return true;
}
else
@@ -815,10 +768,6 @@ namespace OpenSim.Region.Framework.Scenes
m_part.ScheduleFullUpdate();
- //SYMMETRIC SYNC
- m_part.UpdateBucketSyncInfo("TaskInventory");
- m_part.UpdateBucketSyncInfo("InventorySerial");
-
return type;
}
@@ -1073,9 +1022,6 @@ namespace OpenSim.Region.Framework.Scenes
item.OwnerChanged = true;
item.PermsMask = 0;
item.PermsGranter = UUID.Zero;
-
- //SYMMETRIC SYNC
- m_part.UpdateBucketSyncInfo("TaskInventory");
}
}
}
@@ -1092,10 +1038,6 @@ namespace OpenSim.Region.Framework.Scenes
}
m_inventorySerial++;
HasInventoryChanged = true;
-
- //SYMMETRIC SYNC
- m_part.UpdateBucketSyncInfo("TaskInventory");
- m_part.UpdateBucketSyncInfo("InventorySerial");
}
public bool ContainsScripts()
@@ -1233,4 +1175,25 @@ namespace OpenSim.Region.Framework.Scenes
}
#endregion REGION SYNC
}
+
+ #region SYMMETRIC SYNC
+ public class SceneObjectPartInventory : SceneObjectPartInventoryBase
+ {
+ private SceneObjectPart m_part;
+ public SceneObjectPartInventory(SceneObjectPart part):base((SceneObjectPartBase) part)
+ {
+ m_part = part;
+ }
+
+ new protected internal uint Serial
+ {
+ get { return base.Serial; }
+ set
+ {
+ base.Serial = value;
+ //m_part.UpdateBucketSyncInfo("InventorySerial");
+ }
+ }
+ }
+ #endregion
}
diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs
index b44a0100a4..d3b4f94bfa 100644
--- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs
@@ -57,11 +57,12 @@ namespace OpenSim.Region.Framework.Scenes
/// Add the part to the queue of parts for which we need to send an update to the client
///
///
- public void QueuePartForUpdate(SceneObjectPart part)
+ //public void QueuePartForUpdate(SceneObjectPart part)
+ public void QueuePartForUpdate(SceneObjectPartBase part)
{
lock (m_partsUpdateQueue)
{
- m_partsUpdateQueue.Enqueue(part);
+ m_partsUpdateQueue.Enqueue((SceneObjectPart)part);
}
}
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 4189c1fc88..9659845567 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -423,8 +423,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
//That is, calling SetXXX(value) instead of using "XXX = value".
private static void ProcessAllowedDrop(SceneObjectPart obj, XmlTextReader reader)
{
- //obj.AllowedDrop = Util.ReadBoolean(reader);
- obj.SetAllowedDrop(Util.ReadBoolean(reader));
+ obj.AllowedDrop = Util.ReadBoolean(reader);
+ //obj.SetAllowedDrop(Util.ReadBoolean(reader));
}
private static void ProcessCreatorID(SceneObjectPart obj, XmlTextReader reader)
@@ -489,32 +489,32 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
private static void ProcessGroupPosition(SceneObjectPart obj, XmlTextReader reader)
{
- //obj.GroupPosition = Util.ReadVector(reader, "GroupPosition");
- obj.SetGroupPosition(Util.ReadVector(reader, "GroupPosition"));
+ obj.GroupPosition = Util.ReadVector(reader, "GroupPosition");
+ //obj.SetGroupPosition(Util.ReadVector(reader, "GroupPosition"));
}
private static void ProcessOffsetPosition(SceneObjectPart obj, XmlTextReader reader)
{
- //obj.OffsetPosition = Util.ReadVector(reader, "OffsetPosition"); ;
- obj.SetOffsetPosition(Util.ReadVector(reader, "OffsetPosition"));
+ obj.OffsetPosition = Util.ReadVector(reader, "OffsetPosition"); ;
+ //obj.SetOffsetPosition(Util.ReadVector(reader, "OffsetPosition"));
}
private static void ProcessRotationOffset(SceneObjectPart obj, XmlTextReader reader)
{
- //obj.RotationOffset = Util.ReadQuaternion(reader, "RotationOffset");
- obj.SetRotationOffset(Util.ReadQuaternion(reader, "RotationOffset"));
+ obj.RotationOffset = Util.ReadQuaternion(reader, "RotationOffset");
+ //obj.SetRotationOffset(Util.ReadQuaternion(reader, "RotationOffset"));
}
private static void ProcessVelocity(SceneObjectPart obj, XmlTextReader reader)
{
- //obj.Velocity = Util.ReadVector(reader, "Velocity");
- obj.SetVelocity(Util.ReadVector(reader, "Velocity"));
+ obj.Velocity = Util.ReadVector(reader, "Velocity");
+ //obj.SetVelocity(Util.ReadVector(reader, "Velocity"));
}
private static void ProcessAngularVelocity(SceneObjectPart obj, XmlTextReader reader)
{
- //obj.AngularVelocity = Util.ReadVector(reader, "AngularVelocity");
- obj.SetVelocity(Util.ReadVector(reader, "AngularVelocity"));
+ obj.AngularVelocity = Util.ReadVector(reader, "AngularVelocity");
+ //obj.SetVelocity(Util.ReadVector(reader, "AngularVelocity"));
}
private static void ProcessAcceleration(SceneObjectPart obj, XmlTextReader reader)
@@ -573,8 +573,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
private static void ProcessScale(SceneObjectPart obj, XmlTextReader reader)
{
- //obj.Scale = Util.ReadVector(reader, "Scale");
- obj.SetScale(Util.ReadVector(reader, "Scale"));
+ obj.Scale = Util.ReadVector(reader, "Scale");
+ //obj.SetScale(Util.ReadVector(reader, "Scale"));
}
private static void ProcessUpdateFlag(SceneObjectPart obj, XmlTextReader reader)
diff --git a/OpenSim/Region/Framework/Scenes/Types/UpdateQueue.cs b/OpenSim/Region/Framework/Scenes/Types/UpdateQueue.cs
index 213e954c1f..ad26e8159f 100644
--- a/OpenSim/Region/Framework/Scenes/Types/UpdateQueue.cs
+++ b/OpenSim/Region/Framework/Scenes/Types/UpdateQueue.cs
@@ -62,7 +62,7 @@ namespace OpenSim.Region.Framework.Scenes.Types
}
}
- public void Enqueue(SceneObjectPart part)
+ public void Enqueue(SceneObjectPart part)
{
lock (m_syncObject)
{