From ffd60baa4898efd1175dc551b9b1288820edfb61 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 11 Dec 2007 13:30:08 +0000 Subject: * The 'Create' functions should be called to factor up a new, otherwise empty, but with the Id and 1-to-1 child fields instantiated and randomized. * Added two shape constants that --- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 3a4129e..abdbe4d 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -774,6 +774,17 @@ namespace OpenSim.Region.Environment.Scenes return LLUUID.Zero; } + public static SceneObjectPart Create() + { + SceneObjectPart part = new SceneObjectPart(); + part.UUID = LLUUID.Random(); + + PrimitiveBaseShape shape = PrimitiveBaseShape.Create(); + part.Shape = shape; + + return part; + } + #region Copying /// @@ -1603,6 +1614,7 @@ namespace OpenSim.Region.Environment.Scenes public TaskInventoryItem() { } + } } } -- cgit v1.1