summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHadet <hadet@Mac.lan>2026-05-24 15:58:38 -0500
committerErik Kundiman <erik@megapahit.org>2026-05-25 09:47:04 +0700
commit63332f4db61b6146947051f085d6c1b72e4c7898 (patch)
tree84ca88a4863688cea0b2a0e3d7376135596697a1
parent3ac400d744971db9cf7bbfb6df3c1f0ef5662c82 (diff)
add tinting for minimap dots to match nameplate colorsHEADmain
-rw-r--r--indra/newview/llnetmap.cpp35
-rw-r--r--indra/newview/llvoavatar.h1
2 files changed, 35 insertions, 1 deletions
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 63ec43458b..a2a0731256 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -48,6 +48,8 @@
#include "llagentcamera.h"
#include "llappviewer.h" // for gDisconnected
#include "llavataractions.h"
+#include "llgroupcolormap.h" // group-based dot tinting
+#include "llvoavatar.h" // group-based dot tinting
#include "llcallingcard.h" // LLAvatarTracker
#include "llfloaterland.h"
#include "llfloaterworldmap.h"
@@ -432,6 +434,24 @@ void LLNetMap::draw()
LLColor4 color = LLAvatarActions::isFriend(uuid) ? map_avatar_friend_color : map_avatar_color;
+ // Group-based dot tinting: override with group color if one is set.
+ // Look up the avatar's active group UUID from the LLVOAvatar object.
+ if (LLViewerObject* obj = gObjectList.findObject(uuid))
+ {
+ if (LLVOAvatar* av = dynamic_cast<LLVOAvatar*>(obj))
+ {
+ LLUUID active_group = av->getActiveGroupID();
+ if (active_group.notNull())
+ {
+ LLColor4 group_color = LLGroupColorMap::getInstance()->getGroupColor(active_group);
+ if (group_color.mV[VW] >= 0.01f)
+ {
+ color = group_color;
+ }
+ }
+ }
+ }
+
unknown_relative_z = sorted_positions[i].mdV[VZ] >= COARSEUPDATE_MAX_Z &&
camera_position.mV[VZ] >= COARSEUPDATE_MAX_Z;
@@ -505,10 +525,23 @@ void LLNetMap::draw()
LLUIImagePtr you = LLWorldMapView::sAvatarYouLargeImage;
if (you)
{
+ // Group-based dot tinting for self: use gAgent.getGroupID() directly
+ LLColor4 self_color = UI_VERTEX_COLOR;
+ LLUUID self_group = gAgent.getGroupID();
+ if (self_group.notNull())
+ {
+ LLColor4 group_color = LLGroupColorMap::getInstance()->getGroupColor(self_group);
+ if (group_color.mV[VW] >= 0.01f)
+ {
+ self_color = group_color;
+ }
+ }
+
you->draw(ll_round(pos_map.mV[VX] - mDotRadius),
ll_round(pos_map.mV[VY] - mDotRadius),
dot_width,
- dot_width);
+ dot_width,
+ self_color);
F32 dist_to_cursor_squared = dist_vec_squared(LLVector2(pos_map.mV[VX], pos_map.mV[VY]),
LLVector2((F32)local_mouse_x, (F32)local_mouse_y));
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 70e31363ff..0c3b82c886 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -298,6 +298,7 @@ public:
// LLAvatarPropertiesObserver: receives APT_GROUPS reply for group-tint lookup
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type) override;
void sendAvatarGroupsRequest();
+ const LLUUID& getActiveGroupID() const { return mActiveGroupID; }
static void invalidateNameTag(const LLUUID& agent_id);
// force all name tags to rebuild, useful when display names turned on/off
static void invalidateNameTags();