diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index efd7247c29eaf6f84a8b1543994bf95b0883c9cc..c253d23b9540747aee5acac8a0c21346bf1df352 100644 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -94,7 +94,7 @@ void LLDrawPoolTree::render(S32 pass) LLGLState test(GL_ALPHA_TEST, LLGLSLShader::sNoFixedFunction ? 0 : 1); // [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0) - LLViewerTexture* pTexture = (LLPipeline::sRenderTextures) ? static_cast<LLViewerTexture*>(mTexturep) : static_cast<LLViewerTexture*>(LLViewerFetchedTexture::sDefaultDiffuseImagep); + LLViewerTexture* pTexture = (LLPipeline::sRenderTextures) ? mTexturep.get() : LLViewerFetchedTexture::sDefaultDiffuseImagep.get(); gGL.getTexUnit(sDiffTex)->bind(pTexture); // [/SL:KB] // gGL.getTexUnit(sDiffTex)->bind(mTexturep); diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 5c41448b3ef4178191ed5452002dbb59e81ca0c2..f5ed28670fbd5b5b4a893032a58c27e8109e7be0 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -740,6 +740,13 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const } else if ("add_landmark" == command_name) { +// [RLVa:KB] - Checked: 2012-02-08 (RLVa-1.4.5) | Added: RLVa-1.4.5 + if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) + { + return false; + } +// [/RLVa:KB] + if (!is_single_selection) { return false; @@ -760,6 +767,13 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const } else if ("add_landmark_root" == command_name) { +// [RLVa:KB] - Checked: 2012-02-08 (RLVa-1.4.5) | Added: RLVa-1.4.5 + if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) + { + return false; + } +// [/RLVa:KB] + LLViewerInventoryItem* landmark = LLLandmarkActions::findLandmarkForAgentPos(); if (landmark) { @@ -810,12 +824,6 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const } return false; } -// [RLVa:KB] - Checked: 2012-02-08 (RLVa-1.4.5) | Added: RLVa-1.4.5 - else if("add_landmark" == command_name) - { - return !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC); - } -// [/RLVa:KB] else { LL_WARNS() << "Unprocessed command has come: " << command_name << LL_ENDL; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 651c7561fe817a9a1a35c9881206a38818ea3b50..fd091da30cf6c9e0b9eeef22804646d95d0daa54 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -668,8 +668,20 @@ bool LLToolPie::walkToClickedLocation() mPick.mPosGlobal = gAgent.getPositionGlobal() + LLVector3d(LLViewerCamera::instanceFast().getAtAxis()) * SELF_CLICK_WALK_DISTANCE; } - if ((mPick.mPickType == LLPickInfo::PICK_LAND && !mPick.mPosGlobal.isExactlyZero()) || - (mPick.mObjectID.notNull() && !mPick.mPosGlobal.isExactlyZero())) +// if ((mPick.mPickType == LLPickInfo::PICK_LAND && !mPick.mPosGlobal.isExactlyZero()) || +// (mPick.mObjectID.notNull() && !mPick.mPosGlobal.isExactlyZero())) +// [RLVa:KB] - Checked: RLVa-2.0.0 + bool fValidPick = ((mPick.mPickType == LLPickInfo::PICK_LAND && !mPick.mPosGlobal.isExactlyZero()) || + (mPick.mObjectID.notNull() && !mPick.mPosGlobal.isExactlyZero())); + + if ( (fValidPick) && (RlvActions::isRlvEnabled()) && (!RlvActions::canTeleportToLocal(mPick.mPosGlobal)) ) + { + RlvUtil::notifyBlocked(RlvStringKeys::Blocked::AutoPilot); + fValidPick = false; + } + + if (fValidPick) +// [/RLVa:KB] { // [RLVa:KB] - Checked: RLVa-2.0.0 if (RlvActions::isRlvEnabled() && !RlvActions::canTeleportToLocal(mPick.mPosGlobal)) diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp index 6dac9be0184d541f2735dc521fa810122a41eb95..362fc02d94d85ec4bfc7eb2aaaf471b5262e5462 100644 --- a/indra/newview/llviewerinput.cpp +++ b/indra/newview/llviewerinput.cpp @@ -702,11 +702,11 @@ bool run_forward(EKeystate s) } if (!gAgent.getRunning()) { +// [RLVa:KB] - @temprun + gAgent.setTempRun(); +// [/RLVa:KB] // gAgent.setRunning(); // gAgent.sendWalkRun(true); -// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i - gAgent.setTempRun(); -// [/RLVa:KB] } } else if(KEYSTATE_UP == s) @@ -715,11 +715,11 @@ bool run_forward(EKeystate s) { gAgent.mDoubleTapRunMode = LLAgent::DOUBLETAP_NONE; } +// [RLVa:KB] - @temprun + gAgent.clearTempRun(); +// [/RLVa:KB] // gAgent.clearRunning(); // gAgent.sendWalkRun(false); -// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i - gAgent.clearTempRun(); -// [/RLVa:KB] } agent_push_forward(s); return true; @@ -735,24 +735,24 @@ bool run_backward(EKeystate s) } if (!gAgent.getRunning()) { +// [RLVa:KB] - @temprun + gAgent.setTempRun(); +// [/RLVa:KB] // gAgent.setRunning(); // gAgent.sendWalkRun(true); -// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i - gAgent.setTempRun(); -// [/RLVa:KB] } } else if (KEYSTATE_UP == s) { if (gAgent.mDoubleTapRunMode == LLAgent::DOUBLETAP_BACKWARD) - { + { gAgent.mDoubleTapRunMode = LLAgent::DOUBLETAP_NONE; - } + } +// [RLVa:KB] - @temprun + gAgent.clearTempRun(); +// [/RLVa:KB] // gAgent.clearRunning(); // gAgent.sendWalkRun(false); -// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i - gAgent.clearTempRun(); -// [/RLVa:KB] } agent_push_backward(s); return true; @@ -768,24 +768,24 @@ bool run_left(EKeystate s) } if (!gAgent.getRunning()) { +// [RLVa:KB] - @temprun + gAgent.setTempRun(); +// [/RLVa:KB] // gAgent.setRunning(); // gAgent.sendWalkRun(true); -// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i - gAgent.setTempRun(); -// [/RLVa:KB] } } else if (KEYSTATE_UP == s) { if (gAgent.mDoubleTapRunMode == LLAgent::DOUBLETAP_SLIDELEFT) - { + { gAgent.mDoubleTapRunMode = LLAgent::DOUBLETAP_NONE; - } + } +// [RLVa:KB] - @temprun + gAgent.clearTempRun(); +// [/RLVa:KB] // gAgent.clearRunning(); // gAgent.sendWalkRun(false); -// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i - gAgent.clearTempRun(); -// [/RLVa:KB] } agent_slide_left(s); return true; @@ -801,24 +801,24 @@ bool run_right(EKeystate s) } if (!gAgent.getRunning()) { +// [RLVa:KB] - @temprun + gAgent.setTempRun(); +// [/RLVa:KB] // gAgent.setRunning(); // gAgent.sendWalkRun(true); -// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i - gAgent.setTempRun(); -// [/RLVa:KB] } } else if (KEYSTATE_UP == s) { if (gAgent.mDoubleTapRunMode == LLAgent::DOUBLETAP_SLIDERIGHT) - { + { gAgent.mDoubleTapRunMode = LLAgent::DOUBLETAP_NONE; - } + } +// [RLVa:KB] - @temprun + gAgent.clearTempRun(); +// [/RLVa:KB] // gAgent.clearRunning(); // gAgent.sendWalkRun(false); -// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i - gAgent.clearTempRun(); -// [/RLVa:KB] } agent_slide_right(s); return true; @@ -830,21 +830,21 @@ bool toggle_run(EKeystate s) bool run = gAgent.getAlwaysRun(); if (run) { - gAgent.clearAlwaysRun(); -// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i -// gAgent.clearRunning(); +// [RLVa:KB] - @alwaysrun + gAgent.clearAlwaysRun(); // [/RLVa:KB] +// gAgent.clearAlwaysRun(); +// gAgent.clearRunning(); } else { - gAgent.setAlwaysRun(); -// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i -// gAgent.setRunning(); +// [RLVa:KB] - @alwaysrun + gAgent.setAlwaysRun(); // [/RLVa:KB] +// gAgent.setAlwaysRun(); +// gAgent.setRunning(); } -// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i // gAgent.sendWalkRun(!run); -// [/RLVa:KB] return true; } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 943a5ff3344138c9a8aaa4c52b090c2632a015a2..6e5e8d33719e301fc637c8f42c98e803bfebaa93 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3238,20 +3238,11 @@ class LLAvatarCheckImpostorMode : public view_listener_t switch (mode) { case 0: -// [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist) - return LLRenderMuteList::instance().getSavedVisualMuteSetting(avatar->getID()) == LLVOAvatar::AV_RENDER_NORMALLY; -// [/RLVa:KB] -// return (avatar->getVisualMuteSettings() == LLVOAvatar::AV_RENDER_NORMALLY); + return (avatar->getVisualMuteSettings() == LLVOAvatar::AV_RENDER_NORMALLY); case 1: -// [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist) - return LLRenderMuteList::instance().getSavedVisualMuteSetting(avatar->getID()) == LLVOAvatar::AV_DO_NOT_RENDER; -// [/RLVa:KB] -// return (avatar->getVisualMuteSettings() == LLVOAvatar::AV_DO_NOT_RENDER); + return (avatar->getVisualMuteSettings() == LLVOAvatar::AV_DO_NOT_RENDER); case 2: -// [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist) - return LLRenderMuteList::instance().getSavedVisualMuteSetting(avatar->getID()) == LLVOAvatar::AV_ALWAYS_RENDER; -// [/RLVa:KB] -// return (avatar->getVisualMuteSettings() == LLVOAvatar::AV_ALWAYS_RENDER); + return (avatar->getVisualMuteSettings() == LLVOAvatar::AV_ALWAYS_RENDER); default: return false; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e23301b16a9cde829313195655d5f3bdf6111d3c..ff0a7451d2aae8d03266686ea25daebafb48d91c 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1,4 +1,4 @@ -/** +/** * @File llvoavatar.cpp * @brief Implementation of LLVOAvatar class which is a derivation of LLViewerObject * @@ -3711,7 +3711,14 @@ bool LLVOAvatar::isVisuallyMuted() // * check against the render cost and attachment limits if (!isSelf()) { - if (mVisuallyMuteSetting == AV_ALWAYS_RENDER) +// [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist) + if (isRlvSilhouette()) + { + muted = true; + } + else if (mVisuallyMuteSetting == AV_ALWAYS_RENDER) +// [/RLVa:KB] +// if (mVisuallyMuteSetting == AV_ALWAYS_RENDER) { muted = false; } @@ -3728,12 +3735,6 @@ bool LLVOAvatar::isVisuallyMuted() { muted = true; } -// [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist) - else if (isRlvSilhouette()) - { - muted = true; - } -// [/RLVa:KB] else { muted = isTooComplex(); @@ -3782,9 +3783,9 @@ bool LLVOAvatar::isInBuddyList() const } // [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist) -bool LLVOAvatar::isRlvSilhouette() +bool LLVOAvatar::isRlvSilhouette() const { - if (!gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_AVDIST)) + if (!RlvActions::hasBehaviour(RLV_BHVR_SETCAM_AVDIST)) return false; static RlvCachedBehaviourModifier<float> s_nSetCamAvDist(RLV_MODIFIER_SETCAM_AVDIST); @@ -3792,14 +3793,14 @@ bool LLVOAvatar::isRlvSilhouette() const F64 now = LLFrameTimer::getTotalSeconds(); if (now >= mCachedRlvSilhouetteUpdateTime) { - const F64 SECONDS_BETWEEN_NEARBY_UPDATES = .5f; + const F64 SECONDS_BETWEEN_SILHOUETTE_UPDATES = .5f; bool fIsRlvSilhouette = dist_vec_squared(gAgent.getPositionGlobal(), getPositionGlobal()) > s_nSetCamAvDist() * s_nSetCamAvDist(); if (fIsRlvSilhouette != mCachedIsRlvSilhouette) { mCachedIsRlvSilhouette = fIsRlvSilhouette; mNeedsImpostorUpdate = TRUE; } - mCachedRlvSilhouetteUpdateTime = now + SECONDS_BETWEEN_NEARBY_UPDATES; + mCachedRlvSilhouetteUpdateTime = now + SECONDS_BETWEEN_SILHOUETTE_UPDATES; } return mCachedIsRlvSilhouette; } @@ -11244,23 +11245,19 @@ void LLVOAvatar::calcMutedAVColor() LLUUID av_id(getID()); #endif - if (getVisualMuteSettings() == AV_DO_NOT_RENDER) - { -// [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist) - if (isRlvSilhouette()) - { - new_color = LLColor4::silhouette; - change_msg = " not rendered: color is silhouette"; - } - else - { -// [/RLVa:KB] - // explicitly not-rendered avatars are light grey - new_color = LLColor4::grey4; - change_msg = " not rendered: color is grey4"; // [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist) - } + if (isRlvSilhouette()) + { + new_color = LLColor4::silhouette; + change_msg = " not rendered: color is silhouette"; + } + else if (getVisualMuteSettings() == AV_DO_NOT_RENDER) // [/RLVa:KB] +// if (getVisualMuteSettings() == AV_DO_NOT_RENDER) + { + // explicitly not-rendered avatars are light grey + new_color = LLColor4::grey4; + change_msg = " not rendered: color is grey4"; } else if (isInMuteList()) // the user blocked them { diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index fbd3ebcf6c8d47b9c3d45ebbe21ff156e67a9284..dbf199ce92e97094a144f3ed83c415424f9afcdc 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -445,7 +445,7 @@ class LLVOAvatar : bool isInMuteList() const; bool isInBuddyList() const; // [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist) - bool isRlvSilhouette(); + bool isRlvSilhouette() const; // [/RLVa:KB] void forceUpdateVisualMuteSettings(); @@ -462,10 +462,7 @@ class LLVOAvatar : protected: // If you think you need to access this outside LLVOAvatar, you probably want getOverallAppearance() - // [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist) - VisualMuteSettings getVisualMuteSettings() { return (!isRlvSilhouette()) ? mVisuallyMuteSetting : AV_DO_NOT_RENDER; }; -// [/RLVa:KB] -// VisualMuteSettings getVisualMuteSettings() { return mVisuallyMuteSetting; }; + VisualMuteSettings getVisualMuteSettings() { return mVisuallyMuteSetting; }; public: @@ -528,8 +525,8 @@ class LLVOAvatar : mutable bool mCachedInBuddyList; mutable F64 mCachedBuddyListUpdateTime; // [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist) - mutable bool mCachedIsRlvSilhouette = false; - mutable F64 mCachedRlvSilhouetteUpdateTime = 0.f; + mutable bool mCachedIsRlvSilhouette = false; + mutable F64 mCachedRlvSilhouetteUpdateTime = 0.f; // [/RLVa:KB] VisualMuteSettings mVisuallyMuteSetting; // Always or never visually mute this AV @@ -591,7 +588,10 @@ class LLVOAvatar : static void resetImpostors(); static void updateImpostors(); LLRenderTarget mImpostor; - BOOL mNeedsImpostorUpdate; +// [RLVa:KB] - Checked: RLVa-2.4 (@setcam_avdist) + mutable BOOL mNeedsImpostorUpdate; +// [/RLVa:KB] +// BOOL mNeedsImpostorUpdate; S32 mLastImpostorUpdateReason; F32SecondsImplicit mLastImpostorUpdateFrameTime; const LLVector3* getLastAnimExtents() const { return mLastAnimExtents; } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 2c2512690433ceb60e652b565161acac0772c163..f4e8fc7971391736b76076be646d8c9a290feabe 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -792,19 +792,24 @@ void LLPipeline::resizeScreenTexture() GLuint resY = gViewerWindow->getWorldViewHeightRaw(); // [SL:KB] - Patch: Settings-RenderResolutionMultiplier | Checked: Catznip-5.4 + GLuint scaledResX = resX; + GLuint scaledResY = resY; if ( (RenderResolutionDivisor > 1) && (RenderResolutionDivisor < resX) && (RenderResolutionDivisor < resY) ) { - resX /= RenderResolutionDivisor; - resY /= RenderResolutionDivisor; + scaledResX /= RenderResolutionDivisor; + scaledResY /= RenderResolutionDivisor; } else if (RenderResolutionMultiplier != 1.f) { - resX *= RenderResolutionMultiplier; - resY *= RenderResolutionMultiplier; + scaledResX *= RenderResolutionMultiplier; + scaledResY *= RenderResolutionMultiplier; } // [/SL:KB] - if (gResizeScreenTexture || (resX != mScreen.getWidth()) || (resY != mScreen.getHeight())) +// if (gResizeScreenTexture || (resX != mScreen.getWidth()) || (resY != mScreen.getHeight())) +// [SL:KB] - Patch: Settings-RenderResolutionMultiplier | Checked: Catznip-5.4 + if (gResizeScreenTexture || (scaledResX != mScreen.getWidth()) || (scaledResY != mScreen.getHeight())) +// [/SL:KB] { releaseScreenBuffers(); releaseShadowTargets(); diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h index 732f6e8b7e7af1563c69ed8552d69a363a591378..5de5fa97e2935d6252a11e7b2a1e4e4cb860b554 100644 --- a/indra/newview/rlvdefines.h +++ b/indra/newview/rlvdefines.h @@ -37,7 +37,7 @@ const S32 RLV_VERSION_BUILD_COMPAT = 0; // Implementation version const S32 RLVa_VERSION_MAJOR = 2; const S32 RLVa_VERSION_MINOR = 4; -const S32 RLVa_VERSION_PATCH = 1; +const S32 RLVa_VERSION_PATCH = 2; const S32 RLVa_IMPL_ID = 13; // Uncomment before a final release diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index 523555c615af51ddd5fb3715a7e7a716d1a13669..1e055b9a8a90a72736d41a52929f910936e34cae 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -2436,6 +2436,7 @@ void RlvBehaviourToggleHandler<RLV_BHVR_SETCAM>::onCommandToggle(ERlvBehaviour e RlvBehaviourToggleHandler<RLV_BHVR_SETCAM_UNLOCK>::onCommandToggle(RLV_BHVR_SETCAM_UNLOCK, !fHasCamUnlock); gRlvHandler.setCameraOverride(fHasBhvr); + RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_AVDIST)->setPrimaryObject(idRlvObject); RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_AVDISTMIN)->setPrimaryObject(idRlvObject); RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_AVDISTMAX)->setPrimaryObject(idRlvObject); RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_ORIGINDISTMIN)->setPrimaryObject(idRlvObject); diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp index 2b46978300b04ea0e25fd4d6fe54ca2c7e612b2b..8c84ac42e10de476fd76eb32c6502996a1be368f 100644 --- a/indra/newview/rlvhelper.cpp +++ b/indra/newview/rlvhelper.cpp @@ -704,6 +704,10 @@ bool RlvBehaviourModifier::convertOptionValue(const std::string& optionValue, co { return false; } + catch (const std::out_of_range&) + { + return false; + } } // ============================================================================ @@ -811,6 +815,10 @@ bool RlvCommandOptionHelper::parseOption<int>(const std::string& strOption, int& { return false; } + catch (const std::out_of_range&) + { + return false; + } return true; } @@ -831,6 +839,10 @@ bool RlvCommandOptionHelper::parseOption<bool>(const std::string& strOption, boo ss >> std::boolalpha >> fOption; return !ss.fail(); } + catch (const std::out_of_range&) + { + return false; + } } template<> @@ -844,6 +856,10 @@ bool RlvCommandOptionHelper::parseOption<float>(const std::string& strOption, fl { return false; } + catch (const std::out_of_range&) + { + return false; + } return true; }