From aba42d85434b0e0f367a4f691a9fab9d68fab99a Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 3 Dec 2011 15:54:06 +0000 Subject: [PATCH] Correct SOP.GetNumberOfSides() to return 8 for meshes rather than 7 We are returning the actual number of 'sides', not the maximum index number. Also minor format corrections. --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 304a7a7b10..dcbcfa312b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -3273,16 +3273,13 @@ namespace OpenSim.Region.Framework.Scenes break; case PrimType.SCULPT: // Special mesh handling - if (this.Shape.SculptType == 5) - { - ret = 7; // its a mesh then max 8 faces - } + if (Shape.SculptType == (byte)SculptType.Mesh) + ret = 8; // if it's a mesh then max 8 faces else - { - ret = 1; // its a sculpt then max 1 faces - } + ret = 1; // if it's a sculpt then max 1 face break; } + return ret; } @@ -3295,6 +3292,7 @@ namespace OpenSim.Region.Framework.Scenes { if (Shape.SculptEntry) return PrimType.SCULPT; + if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) { if (Shape.PathCurve == (byte)Extrusion.Straight)