Chain SOP constructors together rather than having copy/paste code
parent
3b141e5eee
commit
58021b5300
|
@ -320,12 +320,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public SceneObjectPart()
|
public SceneObjectPart()
|
||||||
{
|
{
|
||||||
// It's not necessary to persist this
|
|
||||||
m_TextureAnimation = Utils.EmptyBytes;
|
m_TextureAnimation = Utils.EmptyBytes;
|
||||||
m_particleSystem = Utils.EmptyBytes;
|
m_particleSystem = Utils.EmptyBytes;
|
||||||
Rezzed = DateTime.UtcNow;
|
Rezzed = DateTime.UtcNow;
|
||||||
Description = String.Empty;
|
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);
|
m_inventory = new SceneObjectPartInventory(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,12 +341,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <param name="offsetPosition"></param>
|
/// <param name="offsetPosition"></param>
|
||||||
public SceneObjectPart(
|
public SceneObjectPart(
|
||||||
UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition,
|
UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition,
|
||||||
Quaternion rotationOffset, Vector3 offsetPosition)
|
Quaternion rotationOffset, Vector3 offsetPosition) : this()
|
||||||
{
|
{
|
||||||
m_name = "Primitive";
|
m_name = "Primitive";
|
||||||
|
|
||||||
Rezzed = DateTime.UtcNow;
|
|
||||||
Description = String.Empty;
|
|
||||||
CreationDate = (int)Utils.DateTimeToUnixTime(Rezzed);
|
CreationDate = (int)Utils.DateTimeToUnixTime(Rezzed);
|
||||||
LastOwnerID = CreatorID = OwnerID = ownerID;
|
LastOwnerID = CreatorID = OwnerID = ownerID;
|
||||||
UUID = UUID.Random();
|
UUID = UUID.Random();
|
||||||
|
@ -362,19 +362,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Velocity = Vector3.Zero;
|
Velocity = Vector3.Zero;
|
||||||
AngularVelocity = Vector3.Zero;
|
AngularVelocity = Vector3.Zero;
|
||||||
Acceleration = 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;
|
Flags = 0;
|
||||||
CreateSelected = true;
|
CreateSelected = true;
|
||||||
|
|
||||||
TrimPermissions();
|
TrimPermissions();
|
||||||
|
|
||||||
m_inventory = new SceneObjectPartInventory(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Constructors
|
#endregion Constructors
|
||||||
|
|
Loading…
Reference in New Issue