From 1f52ca97c75bce4b376a6047993b0995d0527033 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Fri, 31 Oct 2008 08:54:54 +0000 Subject: [PATCH] * Enables PrimitiveBaseShape to be used inside a libOpenMV project by adding some alternate codepaths that avoid triggering OpenSim specific code. Probably not useful for most people, but might be for those working on interop projects. --- OpenSim/Framework/PrimitiveBaseShape.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index 56e566b690..49bc953887 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs @@ -182,6 +182,16 @@ namespace OpenSim.Framework Textures = m_defaultTexture; } + public PrimitiveBaseShape(bool noShape) + { + if (noShape) + return; + + PCode = (byte)PCodeEnum.Primitive; + ExtraParams = new byte[1]; + Textures = m_defaultTexture; + } + [XmlIgnore] public Primitive.TextureEntry Textures { @@ -843,7 +853,7 @@ namespace OpenSim.Framework public void ReadInExtraParamsBytes(byte[] data) { - if (data == null) + if (data == null || data.Length == 1) return; const ushort FlexiEP = 0x10;