From fe29521298eae03fef56122a9f0d01f767806907 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Fri, 27 Sep 2013 11:58:03 -0400 Subject: [PATCH] [VarRegions] Made the radar aware that region width may not be 256 always anymore --- indra/newview/llfloateravatarlist.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index 1cef54918..14ef9b2b6 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -747,6 +747,7 @@ void LLFloaterAvatarList::refreshAvatarList() LLVector3d posagent; posagent.setVec(gAgent.getPositionAgent()); LLVector3d simpos = mypos - posagent; + const S32 width(gAgent.getRegion() ? gAgent.getRegion()->getWidth() : 256); BOOST_FOREACH(av_list_t::value_type& entry, mAvatars) { @@ -904,7 +905,7 @@ void LLFloaterAvatarList::refreshAvatarList() S32 x = (S32)position.mdV[VX]; S32 y = (S32)position.mdV[VY]; - if (x >= 0 && x <= 256 && y >= 0 && y <= 256) + if (x >= 0 && x <= width && y >= 0 && y <= width) { snprintf(temp, sizeof(temp), "%d, %d", x, y); } @@ -915,7 +916,7 @@ void LLFloaterAvatarList::refreshAvatarList() { strcat(temp, "S"); } - else if (y > 256) + else if (y > width) { strcat(temp, "N"); } @@ -923,7 +924,7 @@ void LLFloaterAvatarList::refreshAvatarList() { strcat(temp, "W"); } - else if (x > 256) + else if (x > width) { strcat(temp, "E"); }