property encapsulation for SOP

0.6.0-stable
Sean Dague 2008-07-02 20:31:17 +00:00
parent 79f937612e
commit 2c113c00cf
4 changed files with 247 additions and 103 deletions

View File

@ -702,9 +702,9 @@ namespace OpenSim.Region.Environment.Scenes
public void ApplyNextOwnerPermissions() public void ApplyNextOwnerPermissions()
{ {
BaseMask &= NextOwnerMask; _baseMask &= _nextOwnerMask;
OwnerMask &= NextOwnerMask; _ownerMask &= _nextOwnerMask;
EveryoneMask &= NextOwnerMask; _everyoneMask &= _nextOwnerMask;
foreach (TaskInventoryItem item in m_taskInventory.Values) foreach (TaskInventoryItem item in m_taskInventory.Values)
{ {

View File

@ -236,19 +236,19 @@ namespace OpenSim.Region.Environment.Scenes
m_regionHandle = regionHandle; m_regionHandle = regionHandle;
m_parentGroup = parent; m_parentGroup = parent;
CreationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; _creationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
OwnerID = ownerID; _ownerID = ownerID;
_creatorID = OwnerID; _creatorID = _ownerID;
LastOwnerID = LLUUID.Zero; _lastOwnerID = LLUUID.Zero;
UUID = LLUUID.Random(); UUID = LLUUID.Random();
LocalId = (uint) (localID); LocalId = (uint) (localID);
Shape = shape; Shape = shape;
// Todo: Add More Object Parameter from above! // Todo: Add More Object Parameter from above!
OwnershipCost = 0; _ownershipCost = 0;
ObjectSaleType = (byte) 0; _objectSaleType = (byte) 0;
SalePrice = 0; _salePrice = 0;
Category = (uint) 0; _category = (uint) 0;
LastOwnerID = _creatorID; _lastOwnerID = _creatorID;
// End Todo: /// // End Todo: ///
GroupPosition = groupPosition; GroupPosition = groupPosition;
OffsetPosition = offsetPosition; OffsetPosition = offsetPosition;
@ -262,8 +262,8 @@ namespace OpenSim.Region.Environment.Scenes
// this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from
// the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log
Flags = 0; _flags = 0;
Flags |= LLObject.ObjectFlags.CreateSelected; _flags |= LLObject.ObjectFlags.CreateSelected;
TrimPermissions(); TrimPermissions();
//m_undo = new UndoStack<UndoState>(ParentGroup.GetSceneMaxUndo()); //m_undo = new UndoStack<UndoState>(ParentGroup.GetSceneMaxUndo());
@ -288,18 +288,18 @@ namespace OpenSim.Region.Environment.Scenes
m_regionHandle = regionHandle; m_regionHandle = regionHandle;
m_parentGroup = parent; m_parentGroup = parent;
TimeStampTerse = (uint) Util.UnixTimeSinceEpoch(); TimeStampTerse = (uint) Util.UnixTimeSinceEpoch();
CreationDate = creationDate; _creationDate = creationDate;
OwnerID = ownerID; _ownerID = ownerID;
_creatorID = creatorID; _creatorID = creatorID;
LastOwnerID = lastOwnerID; _lastOwnerID = lastOwnerID;
UUID = LLUUID.Random(); UUID = LLUUID.Random();
LocalId = (uint) (localID); LocalId = (uint) (localID);
Shape = shape; Shape = shape;
OwnershipCost = 0; _ownershipCost = 0;
ObjectSaleType = (byte) 0; _objectSaleType = (byte) 0;
SalePrice = 0; _salePrice = 0;
Category = (uint) 0; _category = (uint) 0;
LastOwnerID = _creatorID; _lastOwnerID = _creatorID;
OffsetPosition = position; OffsetPosition = position;
RotationOffset = rotation; RotationOffset = rotation;
ObjectFlags = flags; ObjectFlags = flags;
@ -335,22 +335,22 @@ namespace OpenSim.Region.Environment.Scenes
#region XML Schema #region XML Schema
public LLUUID LastOwnerID; private LLUUID _lastOwnerID;
public LLUUID OwnerID; private LLUUID _ownerID;
public LLUUID GroupID; private LLUUID _groupID;
public int OwnershipCost; private int _ownershipCost;
public byte ObjectSaleType; private byte _objectSaleType;
public int SalePrice; private int _salePrice;
public uint Category; private uint _category;
public Int32 CreationDate; private Int32 _creationDate;
public uint ParentID = 0; private uint _parentID = 0;
public LLUUID m_sitTargetAvatar = LLUUID.Zero; private LLUUID m_sitTargetAvatar = LLUUID.Zero;
public uint BaseMask = (uint)PermissionMask.All; private uint _baseMask = (uint)PermissionMask.All;
public uint OwnerMask = (uint)PermissionMask.All; private uint _ownerMask = (uint)PermissionMask.All;
public uint GroupMask = (uint)PermissionMask.None; private uint _groupMask = (uint)PermissionMask.None;
public uint EveryoneMask = (uint)PermissionMask.None; private uint _everyoneMask = (uint)PermissionMask.None;
public uint NextOwnerMask = (uint)PermissionMask.All; private uint _nextOwnerMask = (uint)PermissionMask.All;
public LLObject.ObjectFlags Flags = LLObject.ObjectFlags.None; private LLObject.ObjectFlags _flags = LLObject.ObjectFlags.None;
public LLUUID CreatorID { public LLUUID CreatorID {
get get
@ -387,8 +387,8 @@ namespace OpenSim.Region.Environment.Scenes
public uint ObjectFlags public uint ObjectFlags
{ {
get { return (uint)Flags; } get { return (uint)_flags; }
set { Flags = (LLObject.ObjectFlags)value; } set { _flags = (LLObject.ObjectFlags)value; }
} }
public LLUUID UUID public LLUUID UUID
@ -432,7 +432,7 @@ namespace OpenSim.Region.Environment.Scenes
get get
{ {
// If this is a linkset, we don't want the physics engine mucking up our group position here. // If this is a linkset, we don't want the physics engine mucking up our group position here.
if (PhysActor != null && ParentID == 0) if (PhysActor != null && _parentID == 0)
{ {
m_groupPosition.X = PhysActor.Position.X; m_groupPosition.X = PhysActor.Position.X;
m_groupPosition.Y = PhysActor.Position.Y; m_groupPosition.Y = PhysActor.Position.Y;
@ -461,7 +461,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
// Root prim actually goes at Position // Root prim actually goes at Position
if (ParentID == 0) if (_parentID == 0)
{ {
PhysActor.Position = new PhysicsVector(value.X, value.Y, value.Z); PhysActor.Position = new PhysicsVector(value.X, value.Y, value.Z);
@ -515,7 +515,7 @@ namespace OpenSim.Region.Environment.Scenes
get get
{ {
// We don't want the physics engine mucking up the rotations in a linkset // We don't want the physics engine mucking up the rotations in a linkset
if (PhysActor != null && ParentID == 0) if (PhysActor != null && _parentID == 0)
{ {
if (PhysActor.Orientation.x != 0 || PhysActor.Orientation.y != 0 if (PhysActor.Orientation.x != 0 || PhysActor.Orientation.y != 0
|| PhysActor.Orientation.z != 0 || PhysActor.Orientation.w != 0) || PhysActor.Orientation.z != 0 || PhysActor.Orientation.w != 0)
@ -538,7 +538,7 @@ namespace OpenSim.Region.Environment.Scenes
try try
{ {
// Root prim gets value directly // Root prim gets value directly
if (ParentID == 0) if (_parentID == 0)
{ {
PhysActor.Orientation = new Quaternion(value.W, value.X, value.Y, value.Z); PhysActor.Orientation = new Quaternion(value.W, value.X, value.Y, value.Z);
//m_log.Info("[PART]: RO1:" + PhysActor.Orientation.ToString()); //m_log.Info("[PART]: RO1:" + PhysActor.Orientation.ToString());
@ -757,7 +757,7 @@ namespace OpenSim.Region.Environment.Scenes
public LLUUID ObjectOwner public LLUUID ObjectOwner
{ {
get { return OwnerID; } get { return _ownerID; }
} }
public SceneObjectGroup ParentGroup public SceneObjectGroup ParentGroup
@ -796,6 +796,150 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
public uint ParentID {
get {
return _parentID;
}
set {
_parentID = value;
}
}
public int CreationDate {
get {
return _creationDate;
}
set {
_creationDate = value;
}
}
public uint Category {
get {
return _category;
}
set {
_category = value;
}
}
public int SalePrice {
get {
return _salePrice;
}
set {
_salePrice = value;
}
}
public byte ObjectSaleType {
get {
return _objectSaleType;
}
set {
_objectSaleType = value;
}
}
public int OwnershipCost {
get {
return _ownershipCost;
}
set {
_ownershipCost = value;
}
}
public LLUUID GroupID {
get {
return _groupID;
}
set {
_groupID = value;
}
}
public LLUUID OwnerID {
get {
return _ownerID;
}
set {
_ownerID = value;
}
}
public LLUUID LastOwnerID {
get {
return _lastOwnerID;
}
set {
_lastOwnerID = value;
}
}
public uint BaseMask {
get {
return _baseMask;
}
set {
_baseMask = value;
}
}
public uint OwnerMask {
get {
return _ownerMask;
}
set {
_ownerMask = value;
}
}
public uint GroupMask {
get {
return _groupMask;
}
set {
_groupMask = value;
}
}
public uint EveryoneMask {
get {
return _everyoneMask;
}
set {
_everyoneMask = value;
}
}
public uint NextOwnerMask {
get {
return _nextOwnerMask;
}
set {
_nextOwnerMask = value;
}
}
public libsecondlife.LLObject.ObjectFlags Flags {
get {
return _flags;
}
set {
_flags = value;
}
}
public LLUUID SitTargetAvatar {
get {
return m_sitTargetAvatar;
}
set {
m_sitTargetAvatar = value;
}
}
#endregion Public Properties with only Get #endregion Public Properties with only Get
@ -871,7 +1015,7 @@ namespace OpenSim.Region.Environment.Scenes
if ((ObjectFlags & (uint) flag) == 0) if ((ObjectFlags & (uint) flag) == 0)
{ {
//Console.WriteLine("Adding flag: " + ((LLObject.ObjectFlags) flag).ToString()); //Console.WriteLine("Adding flag: " + ((LLObject.ObjectFlags) flag).ToString());
Flags |= flag; _flags |= flag;
} }
//uint currflag = (uint)Flags; //uint currflag = (uint)Flags;
//System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString()); //System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString());
@ -1046,8 +1190,8 @@ namespace OpenSim.Region.Environment.Scenes
dupe.UUID = LLUUID.Random(); dupe.UUID = LLUUID.Random();
dupe.LocalId = localID; dupe.LocalId = localID;
dupe.OwnerID = AgentID; dupe._ownerID = AgentID;
dupe.GroupID = GroupID; dupe._groupID = GroupID;
dupe.GroupPosition = new LLVector3(GroupPosition.X, GroupPosition.Y, GroupPosition.Z); dupe.GroupPosition = new LLVector3(GroupPosition.X, GroupPosition.Y, GroupPosition.Z);
dupe.OffsetPosition = new LLVector3(OffsetPosition.X, OffsetPosition.Y, OffsetPosition.Z); dupe.OffsetPosition = new LLVector3(OffsetPosition.X, OffsetPosition.Y, OffsetPosition.Z);
dupe.RotationOffset = dupe.RotationOffset =
@ -1057,10 +1201,10 @@ namespace OpenSim.Region.Environment.Scenes
dupe.AngularVelocity = new LLVector3(0, 0, 0); dupe.AngularVelocity = new LLVector3(0, 0, 0);
dupe.ObjectFlags = ObjectFlags; dupe.ObjectFlags = ObjectFlags;
dupe.OwnershipCost = OwnershipCost; dupe._ownershipCost = _ownershipCost;
dupe.ObjectSaleType = ObjectSaleType; dupe._objectSaleType = _objectSaleType;
dupe.SalePrice = SalePrice; dupe._salePrice = _salePrice;
dupe.Category = Category; dupe._category = _category;
dupe.TaskInventory = (TaskInventoryDictionary)dupe.TaskInventory.Clone(); dupe.TaskInventory = (TaskInventoryDictionary)dupe.TaskInventory.Clone();
@ -1068,7 +1212,7 @@ namespace OpenSim.Region.Environment.Scenes
dupe.ResetIDs(linkNum); dupe.ResetIDs(linkNum);
// This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated. // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated.
dupe.LastOwnerID = ObjectOwner; dupe._lastOwnerID = ObjectOwner;
byte[] extraP = new byte[Shape.ExtraParams.Length]; byte[] extraP = new byte[Shape.ExtraParams.Length];
Array.Copy(Shape.ExtraParams, extraP, extraP.Length); Array.Copy(Shape.ExtraParams, extraP, extraP.Length);
@ -1095,7 +1239,7 @@ namespace OpenSim.Region.Environment.Scenes
part.Shape = shape; part.Shape = shape;
part.Name = "Primitive"; part.Name = "Primitive";
part.OwnerID = LLUUID.Random(); part._ownerID = LLUUID.Random();
return part; return part;
} }
@ -1140,7 +1284,7 @@ namespace OpenSim.Region.Environment.Scenes
PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate; PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate;
PhysActor.OnOutOfBounds += PhysicsOutOfBounds; PhysActor.OnOutOfBounds += PhysicsOutOfBounds;
if (ParentID != 0 && ParentID != LocalId) if (_parentID != 0 && _parentID != LocalId)
{ {
if (ParentGroup.RootPart.PhysActor != null) if (ParentGroup.RootPart.PhysActor != null)
{ {
@ -1193,11 +1337,11 @@ namespace OpenSim.Region.Environment.Scenes
public uint GetEffectiveObjectFlags() public uint GetEffectiveObjectFlags()
{ {
LLObject.ObjectFlags f = Flags; LLObject.ObjectFlags f = _flags;
if (m_parentGroup == null || m_parentGroup.RootPart == this) if (m_parentGroup == null || m_parentGroup.RootPart == this)
f &= ~(LLObject.ObjectFlags.Touch | LLObject.ObjectFlags.Money); f &= ~(LLObject.ObjectFlags.Touch | LLObject.ObjectFlags.Money);
return (uint)Flags | (uint)LocalFlags; return (uint)_flags | (uint)LocalFlags;
} }
public LLVector3 GetGeometricCenter() public LLVector3 GetGeometricCenter()
@ -1247,23 +1391,23 @@ namespace OpenSim.Region.Environment.Scenes
info.AddValue("TaskInventory", TaskInventory_work); info.AddValue("TaskInventory", TaskInventory_work);
info.AddValue("LastOwnerID", LastOwnerID.UUID); info.AddValue("LastOwnerID", _lastOwnerID.UUID);
info.AddValue("OwnerID", OwnerID.UUID); info.AddValue("OwnerID", _ownerID.UUID);
info.AddValue("GroupID", GroupID.UUID); info.AddValue("GroupID", _groupID.UUID);
info.AddValue("OwnershipCost", OwnershipCost); info.AddValue("OwnershipCost", _ownershipCost);
info.AddValue("ObjectSaleType", ObjectSaleType); info.AddValue("ObjectSaleType", _objectSaleType);
info.AddValue("SalePrice", SalePrice); info.AddValue("SalePrice", _salePrice);
info.AddValue("Category", Category); info.AddValue("Category", _category);
info.AddValue("CreationDate", CreationDate); info.AddValue("CreationDate", _creationDate);
info.AddValue("ParentID", ParentID); info.AddValue("ParentID", _parentID);
info.AddValue("OwnerMask", OwnerMask); info.AddValue("OwnerMask", _ownerMask);
info.AddValue("NextOwnerMask", NextOwnerMask); info.AddValue("NextOwnerMask", _nextOwnerMask);
info.AddValue("GroupMask", GroupMask); info.AddValue("GroupMask", _groupMask);
info.AddValue("EveryoneMask", EveryoneMask); info.AddValue("EveryoneMask", _everyoneMask);
info.AddValue("BaseMask", BaseMask); info.AddValue("BaseMask", _baseMask);
info.AddValue("m_particleSystem", m_particleSystem); info.AddValue("m_particleSystem", m_particleSystem);
@ -1278,7 +1422,7 @@ namespace OpenSim.Region.Environment.Scenes
info.AddValue("m_uuid", m_uuid.UUID); info.AddValue("m_uuid", m_uuid.UUID);
info.AddValue("m_localID", m_localId); info.AddValue("m_localID", m_localId);
info.AddValue("m_name", m_name); info.AddValue("m_name", m_name);
info.AddValue("m_flags", Flags); info.AddValue("m_flags", _flags);
info.AddValue("m_material", m_material); info.AddValue("m_material", m_material);
info.AddValue("m_regionHandle", m_regionHandle); info.AddValue("m_regionHandle", m_regionHandle);
@ -1324,11 +1468,11 @@ namespace OpenSim.Region.Environment.Scenes
public void GetProperties(IClientAPI client) public void GetProperties(IClientAPI client)
{ {
client.SendObjectPropertiesReply(LLUUID.Zero, (ulong)CreationDate, _creatorID, LLUUID.Zero, LLUUID.Zero, client.SendObjectPropertiesReply(LLUUID.Zero, (ulong)_creationDate, _creatorID, LLUUID.Zero, LLUUID.Zero,
GroupID, (short)InventorySerial, LastOwnerID, UUID, OwnerID, _groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID,
ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description, ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description,
ParentGroup.RootPart.OwnerMask, ParentGroup.RootPart.NextOwnerMask, ParentGroup.RootPart.GroupMask, ParentGroup.RootPart.EveryoneMask, ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask,
ParentGroup.RootPart.BaseMask); ParentGroup.RootPart._baseMask);
} }
public LLUUID GetRootPartUUID() public LLUUID GetRootPartUUID()
@ -1513,12 +1657,12 @@ namespace OpenSim.Region.Environment.Scenes
DetectedObject detobj = new DetectedObject(); DetectedObject detobj = new DetectedObject();
detobj.keyUUID = obj.UUID; detobj.keyUUID = obj.UUID;
detobj.nameStr = obj.Name; detobj.nameStr = obj.Name;
detobj.ownerUUID = obj.OwnerID; detobj.ownerUUID = obj._ownerID;
detobj.posVector = obj.AbsolutePosition; detobj.posVector = obj.AbsolutePosition;
detobj.rotQuat = obj.GetWorldRotation(); detobj.rotQuat = obj.GetWorldRotation();
detobj.velVector = obj.Velocity; detobj.velVector = obj.Velocity;
detobj.colliderType = 0; detobj.colliderType = 0;
detobj.groupUUID = obj.GroupID; detobj.groupUUID = obj._groupID;
colliding.Add(detobj); colliding.Add(detobj);
} }
else else
@ -1579,12 +1723,12 @@ namespace OpenSim.Region.Environment.Scenes
DetectedObject detobj = new DetectedObject(); DetectedObject detobj = new DetectedObject();
detobj.keyUUID = obj.UUID; detobj.keyUUID = obj.UUID;
detobj.nameStr = obj.Name; detobj.nameStr = obj.Name;
detobj.ownerUUID = obj.OwnerID; detobj.ownerUUID = obj._ownerID;
detobj.posVector = obj.AbsolutePosition; detobj.posVector = obj.AbsolutePosition;
detobj.rotQuat = obj.GetWorldRotation(); detobj.rotQuat = obj.GetWorldRotation();
detobj.velVector = obj.Velocity; detobj.velVector = obj.Velocity;
detobj.colliderType = 0; detobj.colliderType = 0;
detobj.groupUUID = obj.GroupID; detobj.groupUUID = obj._groupID;
colliding.Add(detobj); colliding.Add(detobj);
} }
else else
@ -1647,12 +1791,12 @@ namespace OpenSim.Region.Environment.Scenes
DetectedObject detobj = new DetectedObject(); DetectedObject detobj = new DetectedObject();
detobj.keyUUID = obj.UUID; detobj.keyUUID = obj.UUID;
detobj.nameStr = obj.Name; detobj.nameStr = obj.Name;
detobj.ownerUUID = obj.OwnerID; detobj.ownerUUID = obj._ownerID;
detobj.posVector = obj.AbsolutePosition; detobj.posVector = obj.AbsolutePosition;
detobj.rotQuat = obj.GetWorldRotation(); detobj.rotQuat = obj.GetWorldRotation();
detobj.velVector = obj.Velocity; detobj.velVector = obj.Velocity;
detobj.colliderType = 0; detobj.colliderType = 0;
detobj.groupUUID = obj.GroupID; detobj.groupUUID = obj._groupID;
colliding.Add(detobj); colliding.Add(detobj);
} }
else else
@ -1755,7 +1899,7 @@ namespace OpenSim.Region.Environment.Scenes
if ((ObjectFlags & (uint) flag) != 0) if ((ObjectFlags & (uint) flag) != 0)
{ {
//Console.WriteLine("Removing flag: " + ((LLObject.ObjectFlags)flag).ToString()); //Console.WriteLine("Removing flag: " + ((LLObject.ObjectFlags)flag).ToString());
Flags &= ~flag; _flags &= ~flag;
} }
//System.Console.WriteLine("prev: " + prevflag.ToString() + " curr: " + Flags.ToString()); //System.Console.WriteLine("prev: " + prevflag.ToString() + " curr: " + Flags.ToString());
//ScheduleFullUpdate(); //ScheduleFullUpdate();
@ -1950,19 +2094,19 @@ namespace OpenSim.Region.Environment.Scenes
{ {
clientFlags &= ~(uint) LLObject.ObjectFlags.CreateSelected; clientFlags &= ~(uint) LLObject.ObjectFlags.CreateSelected;
if (remoteClient.AgentId == OwnerID) if (remoteClient.AgentId == _ownerID)
{ {
if ((uint) (Flags & LLObject.ObjectFlags.CreateSelected) != 0) if ((uint) (_flags & LLObject.ObjectFlags.CreateSelected) != 0)
{ {
clientFlags |= (uint) LLObject.ObjectFlags.CreateSelected; clientFlags |= (uint) LLObject.ObjectFlags.CreateSelected;
Flags &= ~LLObject.ObjectFlags.CreateSelected; _flags &= ~LLObject.ObjectFlags.CreateSelected;
} }
} }
byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A}; byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A};
remoteClient.SendPrimitiveToClient(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, m_shape, remoteClient.SendPrimitiveToClient(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, m_shape,
lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, OwnerID, lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, _ownerID,
m_text, color, ParentID, m_particleSystem, m_clickAction, m_TextureAnimation, m_IsAttachment, m_text, color, _parentID, m_particleSystem, m_clickAction, m_TextureAnimation, m_IsAttachment,
m_attachmentPoint,fromAssetID, Sound, SoundGain, SoundFlags, SoundRadius); m_attachmentPoint,fromAssetID, Sound, SoundGain, SoundFlags, SoundRadius);
} }
@ -2001,7 +2145,7 @@ namespace OpenSim.Region.Environment.Scenes
if (volume < 0) if (volume < 0)
volume = 0; volume = 0;
LLUUID ownerID = OwnerID; LLUUID ownerID = _ownerID;
LLUUID objectID = UUID; LLUUID objectID = UUID;
LLUUID parentID = GetRootPartUUID(); LLUUID parentID = GetRootPartUUID();
LLUUID soundID = LLUUID.Zero; LLUUID soundID = LLUUID.Zero;
@ -2169,7 +2313,7 @@ namespace OpenSim.Region.Environment.Scenes
public void SetGroup(LLUUID groupID, IClientAPI client) public void SetGroup(LLUUID groupID, IClientAPI client)
{ {
GroupID = groupID; _groupID = groupID;
GetProperties(client); GetProperties(client);
m_updateFlag = 2; m_updateFlag = 2;
} }
@ -2185,7 +2329,7 @@ namespace OpenSim.Region.Environment.Scenes
// Use this for attachments! LocalID should be avatar's localid // Use this for attachments! LocalID should be avatar's localid
public void SetParentLocalId(uint localID) public void SetParentLocalId(uint localID)
{ {
ParentID = localID; _parentID = localID;
} }
public void SetPhysicsAxisRotation() public void SetPhysicsAxisRotation()
@ -2766,11 +2910,11 @@ namespace OpenSim.Region.Environment.Scenes
public void TrimPermissions() public void TrimPermissions()
{ {
BaseMask &= (uint)PermissionMask.All; _baseMask &= (uint)PermissionMask.All;
OwnerMask &= (uint)PermissionMask.All; _ownerMask &= (uint)PermissionMask.All;
GroupMask &= (uint)PermissionMask.All; _groupMask &= (uint)PermissionMask.All;
EveryoneMask &= (uint)PermissionMask.All; _everyoneMask &= (uint)PermissionMask.All;
NextOwnerMask &= (uint)PermissionMask.All; _nextOwnerMask &= (uint)PermissionMask.All;
} }
public void Undo() public void Undo()
@ -2837,21 +2981,21 @@ namespace OpenSim.Region.Environment.Scenes
bool set = addRemTF == 1; bool set = addRemTF == 1;
// Are we the owner? // Are we the owner?
if (AgentID == OwnerID) if (AgentID == _ownerID)
{ {
switch (field) switch (field)
{ {
case 2: case 2:
OwnerMask = ApplyMask(OwnerMask, set, mask); _ownerMask = ApplyMask(_ownerMask, set, mask);
break; break;
case 4: case 4:
GroupMask = ApplyMask(GroupMask, set, mask); _groupMask = ApplyMask(_groupMask, set, mask);
break; break;
case 8: case 8:
EveryoneMask = ApplyMask(EveryoneMask, set, mask); _everyoneMask = ApplyMask(_everyoneMask, set, mask);
break; break;
case 16: case 16:
NextOwnerMask = ApplyMask(NextOwnerMask, set, mask); _nextOwnerMask = ApplyMask(_nextOwnerMask, set, mask);
break; break;
} }
SendFullUpdateToAllClients(); SendFullUpdateToAllClients();

View File

@ -2396,7 +2396,7 @@ namespace OpenSim.Region.ScriptEngine.Common
return; return;
} }
} }
else if (m_host.m_sitTargetAvatar == agentID) // Sitting avatar else if (m_host.SitTargetAvatar == agentID) // Sitting avatar
{ {
// When agent is sitting, certain permissions are implicit if requested from sitting agent // When agent is sitting, certain permissions are implicit if requested from sitting agent
int implicitPerms = BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION | int implicitPerms = BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION |

View File

@ -2256,7 +2256,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return; return;
} }
} }
else if (m_host.m_sitTargetAvatar == agentID) // Sitting avatar else if (m_host.SitTargetAvatar == agentID) // Sitting avatar
{ {
// When agent is sitting, certain permissions are implicit if requested from sitting agent // When agent is sitting, certain permissions are implicit if requested from sitting agent
int implicitPerms = ScriptBaseClass.PERMISSION_TRIGGER_ANIMATION | int implicitPerms = ScriptBaseClass.PERMISSION_TRIGGER_ANIMATION |