FIRE-21898 - Add same parcel indicator to avatar radar

Sat, 02 Dec 2017 00:25:27 -0800

author
Liny <liny@pinkfox.xyz>
date
Sat, 02 Dec 2017 00:25:27 -0800
changeset 53530
73f09dff78d1
parent 53529
14e56e1c099a
child 53531
40d803ec7877

FIRE-21898 - Add same parcel indicator to avatar radar

indra/newview/fspanelradar.cpp file | annotate | diff | revisions
indra/newview/fsradar.cpp file | annotate | diff | revisions
indra/newview/skins/default/textures/textures.xml file | annotate | diff | revisions
     1.1 --- a/indra/newview/fspanelradar.cpp	Fri Dec 01 22:36:17 2017 +0100
     1.2 +++ b/indra/newview/fspanelradar.cpp	Sat Dec 02 00:25:27 2017 -0800
     1.3 @@ -358,7 +358,18 @@
     1.4  
     1.5  		row_data["columns"][2]["column"] = "in_region";
     1.6  		row_data["columns"][2]["type"] = "icon";
     1.7 -		row_data["columns"][2]["value"] = (entry["in_region"].asBoolean() ? "avatar_in_region" : "");
     1.8 +		if (entry["on_parcel"].asBoolean())
     1.9 +		{
    1.10 +			row_data["columns"][2]["value"] = "avatar_on_parcel";
    1.11 +		}
    1.12 +		else if (entry["in_region"].asBoolean())
    1.13 +		{
    1.14 +			row_data["columns"][2]["value"] = "avatar_in_region";
    1.15 +		}
    1.16 +		else
    1.17 +		{
    1.18 +			"";
    1.19 +		}
    1.20  
    1.21  		row_data["columns"][3]["column"] = "typing_status";
    1.22  		row_data["columns"][3]["type"] = "icon";
     2.1 --- a/indra/newview/fsradar.cpp	Fri Dec 01 22:36:17 2017 +0100
     2.2 +++ b/indra/newview/fsradar.cpp	Sat Dec 02 00:25:27 2017 -0800
     2.3 @@ -51,6 +51,7 @@
     2.4  #include "lltrans.h"
     2.5  #include "llviewercontrol.h"		// for gSavedSettings
     2.6  #include "llviewermenu.h"			// for gMenuHolder
     2.7 +#include "llViewerparcelmgr.h"
     2.8  #include "llvoavatar.h"
     2.9  #include "llvoiceclient.h"
    2.10  #include "llworld.h"
    2.11 @@ -334,6 +335,7 @@
    2.12  			avRegion = reg->getRegionID();
    2.13  		}
    2.14  		bool isInSameRegion = (avRegion == regionSelf);
    2.15 +		bool isOnSameParcel = LLViewerParcelMgr::instance().inAgentParcel(avPos);
    2.16  		S32 seentime = (S32)difftime(now, ent->mFirstSeen);
    2.17  		S32 hours = (S32)(seentime / 3600);
    2.18  		S32 mins = (S32)((seentime - hours * 3600) / 60);
    2.19 @@ -511,6 +513,7 @@
    2.20  		entry["id"] = avId;
    2.21  		entry["name"] = avName;
    2.22  		entry["in_region"] = isInSameRegion;
    2.23 +		entry["on_parcel"] = isOnSameParcel;
    2.24  		entry["flags"] = avFlag;
    2.25  		entry["seen"] = avSeenStr;
    2.26  		entry["range"] = (avRange > AVATAR_UNKNOWN_RANGE ? llformat("%3.2f", avRange) : llformat(">%3.2f", drawRadius));
     3.1 --- a/indra/newview/skins/default/textures/textures.xml	Fri Dec 01 22:36:17 2017 +0100
     3.2 +++ b/indra/newview/skins/default/textures/textures.xml	Sat Dec 02 00:25:27 2017 -0800
     3.3 @@ -996,6 +996,7 @@
     3.4  <texture name="friends_icon_24x24" file_name="icons/Friends_Icon_24x24.png" preload="false" />
     3.5  <texture name="gift_icon_24x24" file_name="icons/gift_icon_24x24.png" preload="false" />
     3.6  <texture name="avatar_in_region" file_name="icons/green_square.png" preload="false" />
     3.7 +<texture name="avatar_on_parcel" file_name="icons/yellow_square.png" preload="false" />
     3.8  <texture name="radarbox_n" file_name="icons/radar_n.png" preload="false" />
     3.9  <texture name="radarbox_p" file_name="icons/radar_p.png" preload="false" />
    3.10  <texture name="radarbox_s" file_name="icons/radar_s.png" preload="false" />

mercurial