From 39c1ae2408f0e93362894b3b45ebc8f965a6d7c5 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 21 Nov 2011 17:55:10 +0000 Subject: Chain SOP constructors together rather than having copy/paste code --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index b97efc4..24322a1 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -318,12 +318,14 @@ namespace OpenSim.Region.Framework.Scenes /// public SceneObjectPart() { - // It's not necessary to persist this m_TextureAnimation = Utils.EmptyBytes; m_particleSystem = Utils.EmptyBytes; Rezzed = DateTime.UtcNow; Description = String.Empty; - + + // Prims currently only contain a single folder (Contents). From looking at the Second Life protocol, + // 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 m_inventory = new SceneObjectPartInventory(this); } @@ -337,12 +339,10 @@ namespace OpenSim.Region.Framework.Scenes /// public SceneObjectPart( UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition, - Quaternion rotationOffset, Vector3 offsetPosition) + Quaternion rotationOffset, Vector3 offsetPosition) : this() { m_name = "Primitive"; - Rezzed = DateTime.UtcNow; - Description = String.Empty; CreationDate = (int)Utils.DateTimeToUnixTime(Rezzed); LastOwnerID = CreatorID = OwnerID = ownerID; UUID = UUID.Random(); @@ -357,19 +357,10 @@ namespace OpenSim.Region.Framework.Scenes Velocity = Vector3.Zero; AngularVelocity = Vector3.Zero; Acceleration = Vector3.Zero; - m_TextureAnimation = Utils.EmptyBytes; - m_particleSystem = Utils.EmptyBytes; - - // Prims currently only contain a single folder (Contents). From looking at the Second Life protocol, - // 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 - Flags = 0; CreateSelected = true; TrimPermissions(); - - m_inventory = new SceneObjectPartInventory(this); } #endregion Constructors -- cgit v1.1