diff options
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rwxr-xr-x | indra/llmath/llvolume.cpp | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index c2198b91a7..82081ca853 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -3178,6 +3178,16 @@ BOOL LLVolume::isFlat(S32 face) } +LLVolumeParams::LLVolumeParams( LLProfileParams &profile, + LLPathParams &path, + LLUUID sculpt_id, + U8 sculpt_type) : +mProfileParams(profile), +mPathParams(path) +{ + setSculptID(sculpt_id, sculpt_type); +} + bool LLVolumeParams::isSculpt() const { return mSculptID.notNull(); @@ -3494,7 +3504,24 @@ bool LLVolumeParams::setSkew(const F32 skew_value) bool LLVolumeParams::setSculptID(const LLUUID sculpt_id, U8 sculpt_type) { mSculptID = sculpt_id; - mSculptType = sculpt_type; + // Check sculpt type value, it consist of type and flags + U8 type = sculpt_type & LL_SCULPT_TYPE_MASK; + U8 flags = sculpt_type & LL_SCULPT_FLAG_MASK; + if (sculpt_type != (type | flags) || type > LL_SCULPT_TYPE_MAX) + { + if (sculpt_id != LLUUID::null) + { + mSculptType = LL_SCULPT_TYPE_MESH; + } + else + { + mSculptType = LL_SCULPT_TYPE_SPHERE; + } + } + else + { + mSculptType = sculpt_type; + } return true; } @@ -5584,7 +5611,7 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) { resizeVertices(num_vertices+1); - if (!partial_build) + //if (!partial_build) { resizeIndices(num_indices+3); } @@ -5592,7 +5619,7 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) else { resizeVertices(num_vertices); - if (!partial_build) + //if (!partial_build) { resizeIndices(num_indices); } @@ -5714,10 +5741,10 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) LL_CHECK_MEMORY - if (partial_build) - { - return TRUE; - } + //if (partial_build) + //{ + // return TRUE; + //} if (mTypeMask & HOLLOW_MASK) { |