diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 3c69b274d..7462b5d21 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -320,6 +320,11 @@ bool process_login_success_response(std::string& password, U32& first_sim_size_x void transition_back_to_login_panel(const std::string& emsg); void load_default_bindings(const U8& mask); +void set_attachment_visible_nonhud(bool visible, LLViewerJointAttachment* attachment) +{ + if (!attachment->getIsHUDAttachment()) + attachment->setAttachmentVisibility(visible); +} void onlook_mask_changed(const U8& mask) { load_default_bindings(mask); @@ -330,7 +335,10 @@ void onlook_mask_changed(const U8& mask) gStatusBar->setEnabled(visible); // Cameras get no floaters in the way, but don't interrupt mouselook, otherwise. bool ml(gAgentCamera.cameraMouselook()); - if (mask & 1) + bool cam_mode(mask & 1); + if (isAgentAvatarValid()) + std::for_each(gAgentAvatarp->mAttachmentPoints.begin(), gAgentAvatarp->mAttachmentPoints.end(), boost::bind(set_attachment_visible_nonhud, !cam_mode, boost::bind(&std::pair::second, _1))); + if (cam_mode) { if (ml) gAgentCamera.changeCameraToDefault(); gFloaterView->pushVisibleAll(false); diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index c77914e36..b8bf2a022 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -37,6 +37,7 @@ #include "pipeline.h" +#include "lfsimfeaturehandler.h" #include "llagent.h" // Get state values from here #include "llagentcamera.h" #include "llagentwearables.h" @@ -963,6 +964,7 @@ void LLVOAvatarSelf::restoreMeshData() //----------------------------------------------------------------------------- void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode) { + if (LFSimFeatureHandler::instance().getOnLookMask() & 1) return; for (attachment_map_t::iterator iter = mAttachmentPoints.begin(); iter != mAttachmentPoints.end(); ++iter)