From 01154bc01a470dc1ccfe8c05fe6b56857a08cca9 Mon Sep 17 00:00:00 2001 From: hgn Date: Sun, 12 Nov 2023 21:35:31 +0000 Subject: [PATCH] show friends in yellow, dont show out-of-world people --- player_remote.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/player_remote.c b/player_remote.c index 3c5614a..c816a26 100644 --- a/player_remote.c +++ b/player_remote.c @@ -738,7 +738,12 @@ static void remote_player_gui_info( ui_rect box, ui_rect top, bottom; ui_split_ratio( box, k_ui_axis_h, 0.6666f, 1, top, bottom ); - u32 fg = ui_colour( in_world? k_ui_fg: k_ui_fg+4 ); + u32 fg; + + if( type == k_remote_player_gui_type_friend ) + fg = ui_colour( k_ui_yellow + (in_world? k_ui_brighter: 0) ); + else + fg = ui_colour( in_world? k_ui_fg: k_ui_fg+4 ); vg_ui.font = &vg_ui_font_big; ui_text( top, username, 1, k_ui_align_middle_center, fg ); @@ -769,12 +774,15 @@ static void remote_players_imgui_lobby(void){ for( u32 i=0; iactive || player->isblocked ) continue; + + int in_same_world = player->active_world != world_current_instance(); + + if( !player->isfriend && !in_same_world ) + continue; ui_rect box = { x, y, width, height }; - remote_player_gui_info( - box, player->username, "", - player->isfriend, - player->world_match[ world_static.active_instance ] ); + remote_player_gui_info( box, player->username, "", + player->isfriend, in_same_world ); y += height + gap; } } -- 2.25.1