From f370b8e0511618bfe66378e4e5d2058195ae16bd Mon Sep 17 00:00:00 2001 From: hgn Date: Thu, 13 Mar 2025 14:46:43 +0000 Subject: [PATCH] Disable in-lobby player list from world map --- src/player_remote.c | 22 +++++++++------------- src/skaterift.c | 2 +- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/player_remote.c b/src/player_remote.c index 7a17046..903ba98 100644 --- a/src/player_remote.c +++ b/src/player_remote.c @@ -850,9 +850,9 @@ static void remote_player_gui_info( ui_context *ctx, ui_rect box, void remote_players_imgui_lobby( ui_context *ctx ) { - if( network_client.user_intent == k_server_intent_online ){ - if( !(steam_ready && - (network_client.state == k_ESteamNetworkingConnectionState_Connected))) + if( network_client.user_intent == k_server_intent_online ) + { + if( !(steam_ready && (network_client.state == k_ESteamNetworkingConnectionState_Connected)) ) { return; } @@ -862,33 +862,29 @@ void remote_players_imgui_lobby( ui_context *ctx ) x = vg.window_x - width; ctx->font = &vgf_default_large; - ui_text( ctx, (ui_rect){ x, 0, width, height }, - "In World", 1, k_ui_align_middle_center, 0 ); + ui_text( ctx, (ui_rect){ x, 0, width, height }, "In World", 1, k_ui_align_middle_center, 0 ); ctx->font = &vgf_default_small; - ui_rect us = { x, y, width, height }; /* FIXME: your location */ - remote_player_gui_info( ctx, us, steam_username_at_startup, "you", - k_remote_player_gui_type_you, 1 ); + remote_player_gui_info( ctx, us, steam_username_at_startup, "you", k_remote_player_gui_type_you, 1 ); y += height + gap; for( u32 i=0; iactive || player->isblocked ) continue; + if( !player->active || player->isblocked ) + continue; if( !player->isfriend && !player->same_world ) continue; const char *location = player->same_world? "": "another world"; - if( player->region_flags & k_ent_region_flag_hasname ){ + if( player->region_flags & k_ent_region_flag_hasname ) location = player->region; - } ui_rect box = { x, y, width, height }; - remote_player_gui_info( ctx, box, player->username, location, - player->isfriend, player->same_world ); + remote_player_gui_info( ctx, box, player->username, location, player->isfriend, player->same_world ); y += height + gap; } } diff --git a/src/skaterift.c b/src/skaterift.c index ef15b94..020171c 100644 --- a/src/skaterift.c +++ b/src/skaterift.c @@ -536,7 +536,7 @@ void vg_gui( ui_context *ctx ) if( menu_viewing_map() ) { remote_players_imgui_world( ctx, &_world.main, vg.pv, 2000.0f, 0 ); - remote_players_imgui_lobby( ctx ); + //remote_players_imgui_lobby( ctx ); } else { -- 2.25.1