From e75bcd4c59234382ac3efb743a228cd23d92ad45 Mon Sep 17 00:00:00 2001 From: marc Date: Fri, 25 Nov 2011 15:21:42 +0100 Subject: Workaround for mesh to correct the number of faces in GetNumberOfSides(). Meshs are handeled as sculpts but can have up to 8 faces (SL restriction the collada format can handle even more). The patch enables all LSL function that adressing faces to behave correct. Like llGetNumberOfSides(); llSetLinkPrimitiveParamsFast(); llSetPrimitiveParams(); llSetColor(); Signed-off-by: marc --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 24322a1..304a7a7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -3272,7 +3272,15 @@ namespace OpenSim.Region.Framework.Scenes if (hasHollow) ret += 1; break; case PrimType.SCULPT: - ret = 1; + // Special mesh handling + if (this.Shape.SculptType == 5) + { + ret = 7; // its a mesh then max 8 faces + } + else + { + ret = 1; // its a sculpt then max 1 faces + } break; } return ret; -- cgit v1.1