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/Framework/PrimitiveBaseShape.cs                      |  6 ++++++
 OpenSim/Region/Environment/Scenes/SceneObjectPart.cs         | 12 ++++++++++++
 .../ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs  |  2 ++
 3 files changed, 20 insertions(+)

diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index a9da7c8..8081ee7 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -129,6 +129,12 @@ namespace OpenSim.Framework
             TextureEntry = m_defaultTextureEntry;
         }
 
+        public static PrimitiveBaseShape Create()
+        {
+            PrimitiveBaseShape shape = new PrimitiveBaseShape();
+            return shape;
+        }
+
         //void returns need to change of course
         public virtual void GetMesh()
         {
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
 
         /// <summary>
@@ -1603,6 +1614,7 @@ namespace OpenSim.Region.Environment.Scenes
             public TaskInventoryItem()
             {
             }
+
         }
     }
 }
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs
index 1dbbeea..deabec3 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs
@@ -2040,6 +2040,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
         public const int PRIM_FULLBRIGHT = 20;
         public const int PRIM_FLEXIBLE = 21;
         public const int PRIM_TEXGEN = 22;
+        public const int PRIM_CAST_SHADOWS = 24; // Not implemented, here for completeness sake
+        public const int PRIM_POINT_LIGHT = 23;  // Huh?
         public const int PRIM_TEXGEN_DEFAULT = 0;
         public const int PRIM_TEXGEN_PLANAR = 1;
         public const int PRIM_TYPE_BOX = 0;
-- 
cgit v1.1