aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-12-03 15:54:06 +0000
committerJustin Clark-Casey (justincc)2011-12-03 15:54:06 +0000
commitaba42d85434b0e0f367a4f691a9fab9d68fab99a (patch)
tree0cc0e782daacb83c4b8bb6c8724da6694622f277 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentWorkaround for mesh to correct the number of faces in GetNumberOfSides(). Mes... (diff)
downloadopensim-SC-aba42d85434b0e0f367a4f691a9fab9d68fab99a.zip
opensim-SC-aba42d85434b0e0f367a4f691a9fab9d68fab99a.tar.gz
opensim-SC-aba42d85434b0e0f367a4f691a9fab9d68fab99a.tar.bz2
opensim-SC-aba42d85434b0e0f367a4f691a9fab9d68fab99a.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 304a7a7..dcbcfa3 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -3273,16 +3273,13 @@ namespace OpenSim.Region.Framework.Scenes
3273 break; 3273 break;
3274 case PrimType.SCULPT: 3274 case PrimType.SCULPT:
3275 // Special mesh handling 3275 // Special mesh handling
3276 if (this.Shape.SculptType == 5) 3276 if (Shape.SculptType == (byte)SculptType.Mesh)
3277 { 3277 ret = 8; // if it's a mesh then max 8 faces
3278 ret = 7; // its a mesh then max 8 faces
3279 }
3280 else 3278 else
3281 { 3279 ret = 1; // if it's a sculpt then max 1 face
3282 ret = 1; // its a sculpt then max 1 faces
3283 }
3284 break; 3280 break;
3285 } 3281 }
3282
3286 return ret; 3283 return ret;
3287 } 3284 }
3288 3285
@@ -3295,6 +3292,7 @@ namespace OpenSim.Region.Framework.Scenes
3295 { 3292 {
3296 if (Shape.SculptEntry) 3293 if (Shape.SculptEntry)
3297 return PrimType.SCULPT; 3294 return PrimType.SCULPT;
3295
3298 if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) 3296 if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.Square)
3299 { 3297 {
3300 if (Shape.PathCurve == (byte)Extrusion.Straight) 3298 if (Shape.PathCurve == (byte)Extrusion.Straight)