Disable in-lobby player list from world map
authorhgn <hgodden00@gmail.com>
Thu, 13 Mar 2025 14:46:43 +0000 (14:46 +0000)
committerhgn <hgodden00@gmail.com>
Thu, 13 Mar 2025 14:46:43 +0000 (14:46 +0000)
src/player_remote.c
src/skaterift.c

index 7a170460acd93a06db345136ae0538f5e55e4d7c..903ba98966ce7b316f1135f0b892e21e2d305f17 100644 (file)
@@ -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; i<NETWORK_MAX_PLAYERS; i ++ )
    {
       struct network_player *player = &netplayers.list[i];
-      if( !player->active || 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;
    }
 }
index ef15b9466ee94f2aeb67f72d8a5dbda70803cf2b..020171cb2c47f8fe23f66e2e9ebf9066479ed2e6 100644 (file)
@@ -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 
    {