summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterchat.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2011-05-04 11:17:19 -0700
committerLeyla Farazha <leyla@lindenlab.com>2011-05-04 11:17:19 -0700
commit90cad613b029f71a131303d6efaadd22aba21626 (patch)
tree2d2c48fa6f69a478b51ded1b8da578e2a43c5cfe /indra/newview/llfloaterchat.cpp
parentf3bb2e31dc6a1e8e02854a70db4ecd4cf586d4ba (diff)
parent3f9253e783826bbe27a995786be8305f8ecb2d6d (diff)
hg merge
Diffstat (limited to 'indra/newview/llfloaterchat.cpp')
-rw-r--r--indra/newview/llfloaterchat.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp
index c2c2e7fe22..2679dbb78b 100644
--- a/indra/newview/llfloaterchat.cpp
+++ b/indra/newview/llfloaterchat.cpp
@@ -413,8 +413,9 @@ LLColor4 get_text_color(const LLChat& chat)
if (!chat.mPosAgent.isExactlyZero())
{
LLVector3 pos_agent = gAgent.getPositionAgent();
- F32 distance = dist_vec(pos_agent, chat.mPosAgent);
- if (distance > gAgent.getNearChatRadius())
+ F32 distance_squared = dist_vec_squared(pos_agent, chat.mPosAgent);
+ F32 dist_near_chat = gAgent.getNearChatRadius();
+ if (distance_squared > dist_near_chat * dist_near_chat)
{
// diminish far-off chat
text_color.mV[VALPHA] = 0.8f;