patches player visibility
authorhgn <hgodden00@gmail.com>
Mon, 2 Oct 2023 16:31:08 +0000 (17:31 +0100)
committerhgn <hgodden00@gmail.com>
Mon, 2 Oct 2023 16:31:08 +0000 (17:31 +0100)
player_remote.c
player_remote.h
world_load.c

index 888393b2ddc0763fa22fc5d9c9cd3b64b5220093..73ed42ce3a7f4e9f0a2c4544671aaaff61e914a5 100644 (file)
@@ -176,6 +176,14 @@ static void player_remote_rx_200_300( SteamNetworkingMessage_t *msg ){
          return;
       }
 
+      vg_info( "Client #%d equiped: [%s] %s\n", 
+               item->client,
+               (const char *[]){[k_netmsg_playeritem_board]="board",
+                                [k_netmsg_playeritem_player]="player",
+                                [k_netmsg_playeritem_world0]="world0",
+                                [k_netmsg_playeritem_world1]="world1"
+               }[item->type_index], item->uid );
+
       struct network_player *player = &netplayers.list[ item->client ];
       char *uid = player->items[ item->type_index ];
 
index 3c795b24c08b01d76529632a0661c5f79645f3c5..afef269aec7ee42eb1e18c7c154a43d2458d03cc 100644 (file)
@@ -61,5 +61,6 @@ static void remote_player_debug_update(void);
 static void remote_player_send_playerframe(void);
 static void animate_remote_player( u32 index );
 static void render_remote_players( world_instance *world, camera *cam );
+static void relink_all_remote_player_worlds(void);
 
 #endif /* PLAYER_REMOTE_H */
index e17483f5658ae994df5b5c457b34e01e323d2ca3..7fb6e478694a76afb7be635211df3aaf5c621c21 100644 (file)
@@ -9,6 +9,7 @@
 #include "save.h"
 #include "vg/vg_msg.h"
 #include "network.h"
+#include "player_remote.h"
 
 /* 
  * load the .mdl file located in path as a world instance
@@ -293,6 +294,7 @@ static void skaterift_change_world_start( addon_reg *reg ){
 
       world_static.addon_client = reg;
       network_send_item( k_netmsg_playeritem_world1 );
+      relink_all_remote_player_worlds();
    }
 }