Review @setcam_dist after changes to jelly doll rendering
parent
33c6174272
commit
93675c22ba
|
|
@ -3201,20 +3201,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3679,7 +3679,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;
|
||||
}
|
||||
|
|
@ -3696,12 +3703,6 @@ bool LLVOAvatar::isVisuallyMuted()
|
|||
{
|
||||
muted = true;
|
||||
}
|
||||
// [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist)
|
||||
else if (isRlvSilhouette())
|
||||
{
|
||||
muted = true;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
else
|
||||
{
|
||||
muted = isTooComplex();
|
||||
|
|
@ -3731,9 +3732,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);
|
||||
|
|
@ -3741,14 +3742,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;
|
||||
}
|
||||
|
|
@ -11092,23 +11093,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
|
||||
{
|
||||
|
|
@ -11122,10 +11119,7 @@ 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)
|
||||
// [/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]);
|
||||
|
|
|
|||
|
|
@ -438,7 +438,7 @@ public:
|
|||
bool isVisuallyMuted();
|
||||
bool isInMuteList() const;
|
||||
// [RLVa:KB] - Checked: RLVa-2.2 (@setcam_avdist)
|
||||
bool isRlvSilhouette();
|
||||
bool isRlvSilhouette() const;
|
||||
// [/RLVa:KB]
|
||||
void forceUpdateVisualMuteSettings();
|
||||
|
||||
|
|
@ -455,10 +455,7 @@ public:
|
|||
|
||||
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:
|
||||
|
||||
|
|
@ -581,7 +578,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; }
|
||||
|
|
|
|||
Loading…
Reference in New Issue