From 7f847166a931d88a236fc1cf1de96dccdc1dc2bf Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 29 Jun 2008 02:04:44 +0000 Subject: * Syncs the current revision XML Schema(xsd) to the XML Schema of revision 5251. * This should resolve creating content, taking it, and being able to rez it again. --- .../Scenes/SceneObjectPart.Inventory.cs | 21 +- .../Region/Environment/Scenes/SceneObjectPart.cs | 463 +++++++++++---------- 2 files changed, 254 insertions(+), 230 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index dc195f8..8e81702 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs @@ -44,15 +44,7 @@ namespace OpenSim.Region.Environment.Scenes private string m_inventoryFileName = String.Empty; private int m_inventoryFileNameSerial = 0; - /// - /// Exposing this is not particularly good, but it's one of the least evils at the moment to see - /// folder id from prim inventory item data, since it's not (yet) actually stored with the prim. - /// - public LLUUID FolderID - { - get { return UUID; } - set { } // Don't allow assignment, or legacy prims wil b0rk - } + /// /// Serial count for inventory file , used to tell if inventory has changed @@ -60,22 +52,13 @@ namespace OpenSim.Region.Environment.Scenes /// protected uint m_inventorySerial = 0; - public uint InventorySerial - { - get { return m_inventorySerial; } - set { m_inventorySerial = value; } - } /// /// Holds in memory prim inventory /// protected TaskInventoryDictionary m_taskInventory = new TaskInventoryDictionary(); - public TaskInventoryDictionary TaskInventory - { - get { return m_taskInventory; } - set { m_taskInventory = value; } - } + /// /// Tracks whether inventory has changed since the last persistent backup diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index f9ee542..4a68514 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -101,30 +101,17 @@ namespace OpenSim.Region.Environment.Scenes [XmlIgnore] public bool AllowedDrop = false; - public uint BaseMask = (uint)PermissionMask.All; - public uint Category; - public Int32 CreationDate; - private LLUUID _creatorID; + [XmlIgnore] public bool DIE_AT_EDGE = false; - public uint EveryoneMask = (uint)PermissionMask.None; - public LLObject.ObjectFlags Flags = LLObject.ObjectFlags.None; - public LLUUID GroupID; - public uint GroupMask = (uint)PermissionMask.None; - public LLUUID LastOwnerID; - public uint NextOwnerMask = (uint)PermissionMask.All; - public byte ObjectSaleType; - public LLUUID OwnerID; - public uint OwnerMask = (uint)PermissionMask.All; - public int OwnershipCost; - public uint ParentID = 0; // TODO: This needs to be persisted in next XML version update! [XmlIgnore] public int[] PayPrice = {-2,-2,-2,-2,-2}; [XmlIgnore] public PhysicsActor PhysActor = null; - public int SalePrice; + + //Xantor 20080528 Sound stuff: // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet. @@ -158,7 +145,8 @@ namespace OpenSim.Region.Environment.Scenes public uint m_attachmentPoint = (byte)0; [XmlIgnore] public PhysicsVector m_rotationAxis = new PhysicsVector(1f,1f,1f); - public LLUUID m_sitTargetAvatar = LLUUID.Zero; + + [XmlIgnore] public bool m_undoing = false; @@ -181,6 +169,7 @@ namespace OpenSim.Region.Environment.Scenes private string m_text = String.Empty; private string m_touchName = String.Empty; private UndoStack m_undo = new UndoStack(5); + private LLUUID _creatorID; /// /// Only used internally to schedule client updates. @@ -346,70 +335,98 @@ namespace OpenSim.Region.Environment.Scenes #endregion Constructors - #region Public Properties + #region XML Schema - public LLVector3 AbsolutePosition - { - get { - if (m_IsAttachment) - return GroupPosition; + public LLUUID LastOwnerID; + public LLUUID OwnerID; + public LLUUID GroupID; + public int OwnershipCost; + public byte ObjectSaleType; + public int SalePrice; + public uint Category; + public Int32 CreationDate; + public uint ParentID = 0; + public LLUUID m_sitTargetAvatar = LLUUID.Zero; + public uint BaseMask = (uint)PermissionMask.All; + public uint OwnerMask = (uint)PermissionMask.All; + public uint GroupMask = (uint)PermissionMask.None; + public uint EveryoneMask = (uint)PermissionMask.None; + public uint NextOwnerMask = (uint)PermissionMask.All; + public LLObject.ObjectFlags Flags = LLObject.ObjectFlags.None; + + public LLUUID CreatorID { + get + { + return _creatorID; + } + set + { + _creatorID = value; + } + } - return m_offsetPosition + m_groupPosition; } + /// + /// Exposing this is not particularly good, but it's one of the least evils at the moment to see + /// folder id from prim inventory item data, since it's not (yet) actually stored with the prim. + /// + public LLUUID FolderID + { + get { return UUID; } + set { } // Don't allow assignment, or legacy prims wil b0rk } - /// - public LLVector3 Acceleration + public uint InventorySerial { - get { return m_acceleration; } - set { m_acceleration = value; } + get { return m_inventorySerial; } + set { m_inventorySerial = value; } } - /// - public LLVector3 AngularVelocity + public TaskInventoryDictionary TaskInventory { - get { return m_angularVelocity; } - set { m_angularVelocity = value; } + get { return m_taskInventory; } + set { m_taskInventory = value; } } - public byte ClickAction + public uint ObjectFlags { - get { return m_clickAction; } - set - { - m_clickAction = value; - } + get { return (uint)Flags; } + set { Flags = (LLObject.ObjectFlags)value; } + } + + public LLUUID UUID + { + get { return m_uuid; } + set { m_uuid = value; } } - public LLUUID CreatorID { - get - { - return _creatorID; - } - set - { - _creatorID = value; - } + public uint LocalId + { + get { return m_localId; } + set { m_localId = value; } } - - public Color Color + + public virtual string Name { - get { return m_color; } - set - { - m_color = value; - TriggerScriptChangedEvent(Changed.COLOR); + get { return m_name; } + set { m_name = value; } + } + + public byte Material + { + get { return (byte) m_material; } + set { m_material = (LLObject.MaterialType) value; } + } - /* ScheduleFullUpdate() need not be called b/c after - * setting the color, the text will be set, so then - * ScheduleFullUpdate() will be called. */ - //ScheduleFullUpdate(); - } + public ulong RegionHandle + { + get { return m_regionHandle; } + set { m_regionHandle = value; } } - public string Description + public int ScriptAccessPin { - get { return m_description; } - set { m_description = value; } + get { return m_scriptAccessPin; } + set { m_scriptAccessPin = (int)value; } } public LLVector3 GroupPosition @@ -474,51 +491,6 @@ namespace OpenSim.Region.Environment.Scenes } } - public int LinkNum - { - get { return m_linkNum; } - set - { - m_linkNum = value; - TriggerScriptChangedEvent(Changed.LINK); - - } - } - - public uint LocalId - { - get { return m_localId; } - set { m_localId = value; } - } - - public byte Material - { - get { return (byte) m_material; } - set { m_material = (LLObject.MaterialType) value; } - } - - public virtual string Name - { - get { return m_name; } - set { m_name = value; } - } - - public LLUUID ObjectCreator - { - get { return _creatorID; } - } - - public uint ObjectFlags - { - get { return (uint)Flags; } - set { Flags = (LLObject.ObjectFlags)value; } - } - - public LLUUID ObjectOwner - { - get { return OwnerID; } - } - public LLVector3 OffsetPosition { get { return m_offsetPosition; } @@ -526,31 +498,20 @@ namespace OpenSim.Region.Environment.Scenes { StoreUndoState(); m_offsetPosition = value; - try - { - // Hack to get the child prim to update world positions in the physics engine - ParentGroup.ResetChildPrimPhysicsPositions(); + try + { + // Hack to get the child prim to update world positions in the physics engine + ParentGroup.ResetChildPrimPhysicsPositions(); - } - catch (NullReferenceException) - { - // Ignore, and skip over. - } - //m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString()); + } + catch (NullReferenceException) + { + // Ignore, and skip over. + } + //m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString()); } } - public SceneObjectGroup ParentGroup - { - get { return m_parentGroup; } - } - - public ulong RegionHandle - { - get { return m_regionHandle; } - set { m_regionHandle = value; } - } - public LLQuaternion RotationOffset { get @@ -603,7 +564,8 @@ namespace OpenSim.Region.Environment.Scenes } } - public LLVector3 RotationalVelocity + /// + public LLVector3 Velocity { get { @@ -614,85 +576,82 @@ namespace OpenSim.Region.Environment.Scenes { if (PhysActor.IsPhysical) { - m_rotationalvelocity.FromBytes(PhysActor.RotationalVelocity.GetBytes(),0); + m_velocity.X = PhysActor.Velocity.X; + m_velocity.Y = PhysActor.Velocity.Y; + m_velocity.Z = PhysActor.Velocity.Z; } } - return m_rotationalvelocity; + return m_velocity; } - set { m_rotationalvelocity = value; } - } - public LLVector3 Scale - { - get { return m_shape.Scale; } set { - StoreUndoState(); - m_shape.Scale = value; - - if (PhysActor != null && m_parentGroup != null) + m_velocity = value; + if (PhysActor != null) { - if (m_parentGroup.Scene != null) + if (PhysActor.IsPhysical) { - if (m_parentGroup.Scene.PhysicsScene != null) - { - PhysActor.Size = new PhysicsVector(m_shape.Scale.X, m_shape.Scale.Y, m_shape.Scale.Z); - m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); - } + PhysActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z); + m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); } } - TriggerScriptChangedEvent(Changed.SCALE); } } - public int ScriptAccessPin - { - get { return m_scriptAccessPin; } - set { m_scriptAccessPin = (int)value; } - } - - public scriptEvents ScriptEvents - { - get { return m_aggregateScriptEvents; } - } - - public PrimitiveBaseShape Shape + public LLVector3 RotationalVelocity { - get { return m_shape; } - set + get { - m_shape = value; - TriggerScriptChangedEvent(Changed.SHAPE); + //if (PhysActor.Velocity.x != 0 || PhysActor.Velocity.y != 0 + //|| PhysActor.Velocity.z != 0) + //{ + if (PhysActor != null) + { + if (PhysActor.IsPhysical) + { + m_rotationalvelocity.FromBytes(PhysActor.RotationalVelocity.GetBytes(), 0); + } + } + + return m_rotationalvelocity; } + set { m_rotationalvelocity = value; } } - public string SitName + /// + public LLVector3 AngularVelocity { - get { return m_sitName; } - set { m_sitName = value; } + get { return m_angularVelocity; } + set { m_angularVelocity = value; } } - public Quaternion SitTargetOrientation + /// + public LLVector3 Acceleration { - get { return m_sitTargetOrientation; } + get { return m_acceleration; } + set { m_acceleration = value; } } - public Vector3 SitTargetPosition + + public string Description { - get { return m_sitTargetPosition; } + get { return m_description; } + set { m_description = value; } } - - public bool Stopped + + public Color Color { - get { - double threshold = 0.02; - return (Math.Abs(Velocity.X) < threshold && - Math.Abs(Velocity.Y) < threshold && - Math.Abs(Velocity.Z) < threshold && - Math.Abs(AngularVelocity.X) < threshold && - Math.Abs(AngularVelocity.Y) < threshold && - Math.Abs(AngularVelocity.Z) < threshold); + get { return m_color; } + set + { + m_color = value; + TriggerScriptChangedEvent(Changed.COLOR); + + /* ScheduleFullUpdate() need not be called b/c after + * setting the color, the text will be set, so then + * ScheduleFullUpdate() will be called. */ + //ScheduleFullUpdate(); } } @@ -713,60 +672,142 @@ namespace OpenSim.Region.Environment.Scenes } } + + public string SitName + { + get { return m_sitName; } + set { m_sitName = value; } + } + public string TouchName { get { return m_touchName; } set { m_touchName = value; } } - public LLUUID UUID + public int LinkNum { - get { return m_uuid; } - set { m_uuid = value; } + get { return m_linkNum; } + set + { + m_linkNum = value; + TriggerScriptChangedEvent(Changed.LINK); + + } } - public byte UpdateFlag + public byte ClickAction { - get { return m_updateFlag; } - set { m_updateFlag = value; } + get { return m_clickAction; } + set + { + m_clickAction = value; + } } - /// - public LLVector3 Velocity + public PrimitiveBaseShape Shape { - get + get { return m_shape; } + set { - //if (PhysActor.Velocity.x != 0 || PhysActor.Velocity.y != 0 - //|| PhysActor.Velocity.z != 0) - //{ - if (PhysActor != null) - { - if (PhysActor.IsPhysical) - { - m_velocity.X = PhysActor.Velocity.X; - m_velocity.Y = PhysActor.Velocity.Y; - m_velocity.Z = PhysActor.Velocity.Z; - } - } - - return m_velocity; + m_shape = value; + TriggerScriptChangedEvent(Changed.SHAPE); } - - set + } + public LLVector3 Scale + { + get { return m_shape.Scale; } + set { - m_velocity = value; - if (PhysActor != null) + StoreUndoState(); + m_shape.Scale = value; + + if (PhysActor != null && m_parentGroup != null) { - if (PhysActor.IsPhysical) + if (m_parentGroup.Scene != null) { - PhysActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z); - m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); + if (m_parentGroup.Scene.PhysicsScene != null) + { + PhysActor.Size = new PhysicsVector(m_shape.Scale.X, m_shape.Scale.Y, m_shape.Scale.Z); + m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); + } } } + TriggerScriptChangedEvent(Changed.SCALE); + } + } + public byte UpdateFlag + { + get { return m_updateFlag; } + set { m_updateFlag = value; } + } + + #endregion + +//--------------- + + + #region Public Properties with only Get + + + public LLVector3 AbsolutePosition + { + get { + if (m_IsAttachment) + return GroupPosition; + + return m_offsetPosition + m_groupPosition; } + } + + public LLUUID ObjectCreator + { + get { return _creatorID; } + } + + public LLUUID ObjectOwner + { + get { return OwnerID; } + } + + public SceneObjectGroup ParentGroup + { + get { return m_parentGroup; } + } + + + + public scriptEvents ScriptEvents + { + get { return m_aggregateScriptEvents; } + } + + + public Quaternion SitTargetOrientation + { + get { return m_sitTargetOrientation; } + } + + public Vector3 SitTargetPosition + { + get { return m_sitTargetPosition; } + } + + public bool Stopped + { + get { + double threshold = 0.02; + return (Math.Abs(Velocity.X) < threshold && + Math.Abs(Velocity.Y) < threshold && + Math.Abs(Velocity.Z) < threshold && + Math.Abs(AngularVelocity.X) < threshold && + Math.Abs(AngularVelocity.Y) < threshold && + Math.Abs(AngularVelocity.Z) < threshold); } } - #endregion Public Properties + + + #endregion Public Properties with only Get #region Private Methods -- cgit v1.1