Merge branch 'rlva/maintenance' into master
commit
c1ce1bc355
|
|
@ -3864,19 +3864,13 @@ bool check_avatar_render_mode(U32 mode)
|
|||
switch (mode)
|
||||
{
|
||||
case 0:
|
||||
// [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist)
|
||||
return FSAvatarRenderPersistence::instance().getAvatarRenderSettings(avatar->getID()) == LLVOAvatar::AV_RENDER_NORMALLY;
|
||||
// [/RLVa:KB]
|
||||
// return (avatar->getVisualMuteSettings() == LLVOAvatar::AV_RENDER_NORMALLY);
|
||||
case 1:
|
||||
// [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist)
|
||||
return FSAvatarRenderPersistence::instance().getAvatarRenderSettings(avatar->getID()) == LLVOAvatar::AV_DO_NOT_RENDER;
|
||||
// [/RLVa:KB]
|
||||
// return (avatar->getVisualMuteSettings() == LLVOAvatar::AV_DO_NOT_RENDER);
|
||||
case 2:
|
||||
// [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist)
|
||||
return FSAvatarRenderPersistence::instance().getAvatarRenderSettings(avatar->getID()) == LLVOAvatar::AV_ALWAYS_RENDER;
|
||||
// [/RLVa:KB]
|
||||
// return (avatar->getVisualMuteSettings() == LLVOAvatar::AV_ALWAYS_RENDER);
|
||||
case 4:
|
||||
return FSAvatarRenderPersistence::instance().getAvatarRenderSettings(avatar->getID()) != LLVOAvatar::AV_RENDER_NORMALLY;
|
||||
|
|
|
|||
|
|
@ -4231,7 +4231,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;
|
||||
}
|
||||
|
|
@ -4250,12 +4257,6 @@ bool LLVOAvatar::isVisuallyMuted()
|
|||
// muted = true;
|
||||
//}
|
||||
// </FS:Ansariel>
|
||||
// [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist)
|
||||
else if (isRlvSilhouette())
|
||||
{
|
||||
muted = true;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
else
|
||||
{
|
||||
muted = isTooComplex();
|
||||
|
|
@ -4286,9 +4287,9 @@ bool LLVOAvatar::isInMuteList() 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);
|
||||
|
|
@ -4296,14 +4297,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;
|
||||
}
|
||||
|
|
@ -12251,23 +12252,19 @@ void LLVOAvatar::calcMutedAVColor()
|
|||
std::string change_msg;
|
||||
LLUUID av_id(getID());
|
||||
|
||||
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 if (getVisualMuteSettings() == AV_DO_NOT_RENDER)
|
||||
// [/RLVa:KB]
|
||||
// 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)
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
// explicitly not-rendered avatars are light grey
|
||||
new_color = LLColor4::grey4;
|
||||
change_msg = " not rendered: color is grey4";
|
||||
}
|
||||
else if (LLMuteList::getInstance()->isMuted(av_id)) // the user blocked them
|
||||
{
|
||||
|
|
@ -12281,14 +12278,8 @@ void LLVOAvatar::calcMutedAVColor()
|
|||
change_msg = " simple imposter ";
|
||||
}
|
||||
#ifdef COLORIZE_JELLYDOLLS
|
||||
// else if ( mMutedAVColor == LLColor4::white || mMutedAVColor == LLColor4::grey3 || mMutedAVColor == LLColor4::grey4 )
|
||||
// [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist)
|
||||
else if ( mMutedAVColor == LLColor4::white || mMutedAVColor == LLColor4::grey3 || mMutedAVColor == LLColor4::grey4 || mMutedAVColor == LLColor4::silhouette)
|
||||
#else
|
||||
else if (mMutedAVColor == LLColor4::silhouette)
|
||||
#endif
|
||||
// [/RLVa:KB]
|
||||
{
|
||||
else if ( mMutedAVColor == LLColor4::white || mMutedAVColor == LLColor4::grey3 || mMutedAVColor == LLColor4::grey4 )
|
||||
{
|
||||
// select a color based on the first byte of the agents uuid so any muted agent is always the same color
|
||||
F32 color_value = (F32) (av_id.mData[0]);
|
||||
F32 spectrum = (color_value / 256.0); // spectrum is between 0 and 1.f
|
||||
|
|
@ -12307,8 +12298,7 @@ void LLVOAvatar::calcMutedAVColor()
|
|||
new_color.normalize();
|
||||
new_color *= 0.28f; // Tone it down
|
||||
}
|
||||
// <FS:Ansariel> RLVa fix
|
||||
//#endif
|
||||
#endif
|
||||
else
|
||||
{
|
||||
new_color = LLColor4::grey4;
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ public:
|
|||
bool isVisuallyMuted();
|
||||
bool isInMuteList() const;
|
||||
// [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist)
|
||||
bool isRlvSilhouette();
|
||||
bool isRlvSilhouette() const;
|
||||
// [/RLVa:KB]
|
||||
void forceUpdateVisualMuteSettings();
|
||||
|
||||
|
|
@ -495,10 +495,7 @@ public:
|
|||
void setVisualMuteSettings(VisualMuteSettings set);
|
||||
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:
|
||||
|
||||
|
|
@ -558,8 +555,8 @@ private:
|
|||
mutable bool mCachedInMuteList;
|
||||
mutable F64 mCachedMuteListUpdateTime;
|
||||
// [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
|
||||
|
|
@ -623,7 +620,10 @@ public:
|
|||
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; }
|
||||
|
|
|
|||
|
|
@ -823,19 +823,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 > 0.f && 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();
|
||||
|
|
|
|||
|
|
@ -39,7 +39,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
|
||||
|
|
|
|||
|
|
@ -2451,6 +2451,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::instance().getModifier(RLV_MODIFIER_SETCAM_AVDISTMIN)->setPrimaryObject(idRlvObject);
|
||||
RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_AVDISTMAX)->setPrimaryObject(idRlvObject);
|
||||
RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_ORIGINDISTMIN)->setPrimaryObject(idRlvObject);
|
||||
|
|
|
|||
Loading…
Reference in New Issue