diff options
author | Dave Parks <davep@lindenlab.com> | 2011-10-05 17:57:13 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-10-05 17:57:13 -0500 |
commit | 2b51a7a60942b1efc99cee43489ef2f92fa7a188 (patch) | |
tree | bc797bb337c1673633cd304dce9687e519760b52 /indra/newview/pipeline.cpp | |
parent | 967479f9039dc358b9419be7f117162f7d90609c (diff) |
SH-2454 Fix for head attachments not casting shadows when in mouselook mode.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e672f7c4f1..83f9863224 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -8300,6 +8300,17 @@ void LLPipeline::generateSunShadow(LLCamera& camera) return; } + BOOL skip_avatar_update = FALSE; + if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK) + { + skip_avatar_update = TRUE; + } + + if (!skip_avatar_update) + { + gAgentAvatarp->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON); + } + F64 last_modelview[16]; F64 last_projection[16]; for (U32 i = 0; i < 16; i++) @@ -8413,6 +8424,12 @@ void LLPipeline::generateSunShadow(LLCamera& camera) mShadowFrustPoints[3].clear(); } popRenderTypeMask(); + + if (!skip_avatar_update) + { + gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode()); + } + return; } @@ -9001,6 +9018,11 @@ void LLPipeline::generateSunShadow(LLCamera& camera) } popRenderTypeMask(); + + if (!skip_avatar_update) + { + gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode()); + } } void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture) |