summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2020-06-24 15:43:00 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2020-06-24 15:43:00 +0100
commitedddd1b7660c2c155f86fcfddcbff3d32d03e7da (patch)
tree3554440f1a39e88599fa5019bc0b66a6a1e2dcfd /indra
parent8a8d941e4ac487e191b4f12446526e3e3f3468fe (diff)
SL-13000 - de-colorize jellydolls
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvoavatar.cpp33
1 files changed, 19 insertions, 14 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 90035038fc..0f52d64da1 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -10767,8 +10767,8 @@ void LLVOAvatar::calcMutedAVColor()
if (getVisualMuteSettings() == AV_DO_NOT_RENDER)
{
// explicitly not-rendered avatars are light grey
- new_color = LLColor4::grey3;
- change_msg = " not rendered: color is grey3";
+ new_color = LLColor4::grey4;
+ change_msg = " not rendered: color is grey4";
}
else if (LLMuteList::getInstance()->isMuted(av_id)) // the user blocked them
{
@@ -10781,26 +10781,31 @@ void LLVOAvatar::calcMutedAVColor()
new_color = LLColor4::white;
change_msg = " simple imposter ";
}
+#ifdef COLORIZE_JELLYDOLLS
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
+ F32 spectrum = (color_value / 256.0); // spectrum is between 0 and 1.f
- // Array of colors. These are arranged so only one RGB color changes between each step,
+ // Array of colors. These are arranged so only one RGB color changes between each step,
// and it loops back to red so there is an even distribution. It is not a heat map
- const S32 NUM_SPECTRUM_COLORS = 7;
+ const S32 NUM_SPECTRUM_COLORS = 7;
static LLColor4 * spectrum_color[NUM_SPECTRUM_COLORS] = { &LLColor4::red, &LLColor4::magenta, &LLColor4::blue, &LLColor4::cyan, &LLColor4::green, &LLColor4::yellow, &LLColor4::red };
-
- spectrum = spectrum * (NUM_SPECTRUM_COLORS - 1); // Scale to range of number of colors
- S32 spectrum_index_1 = floor(spectrum); // Desired color will be after this index
- S32 spectrum_index_2 = spectrum_index_1 + 1; // and before this index (inclusive)
+
+ spectrum = spectrum * (NUM_SPECTRUM_COLORS - 1); // Scale to range of number of colors
+ S32 spectrum_index_1 = floor(spectrum); // Desired color will be after this index
+ S32 spectrum_index_2 = spectrum_index_1 + 1; // and before this index (inclusive)
F32 fractBetween = spectrum - (F32)(spectrum_index_1); // distance between the two indexes (0-1)
-
- new_color = lerp(*spectrum_color[spectrum_index_1], *spectrum_color[spectrum_index_2], fractBetween);
- new_color.normalize();
- new_color *= 0.28f; // Tone it down
+ new_color = lerp(*spectrum_color[spectrum_index_1], *spectrum_color[spectrum_index_2], fractBetween);
+ new_color.normalize();
+ new_color *= 0.28f; // Tone it down
+ }
+#endif
+ else
+ {
+ new_color = LLColor4::grey4;
change_msg = " over limit color ";
}