projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
show friends in yellow, dont show out-of-world people
[carveJwlIkooP6JGAAIwe30JlM.git]
/
player_remote.c
diff --git
a/player_remote.c
b/player_remote.c
index 3c5614a1a5c0b6e203cdf199b4482e7f87e97278..c816a26d48ade3b307de9b94c1480f3992a085f9 100644
(file)
--- 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 );
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 );
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; i<NETWORK_MAX_PLAYERS; i ++ ){
struct network_player *player = &netplayers.list[i];
if( !player->active || player->isblocked ) continue;
for( u32 i=0; i<NETWORK_MAX_PLAYERS; i ++ ){
struct network_player *player = &netplayers.list[i];
if( !player->active || 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 };
ui_rect box = { x, y, width, height };
- remote_player_gui_info(
- box, player->username, "<null>",
- player->isfriend,
- player->world_match[ world_static.active_instance ] );
+ remote_player_gui_info( box, player->username, "<null>",
+ player->isfriend, in_same_world );
y += height + gap;
}
}
y += height + gap;
}
}