From d00cf977616e5d238c49fd42a1fc8c87200a8672 Mon Sep 17 00:00:00 2001 From: hgn Date: Sun, 1 Oct 2023 06:45:48 +0100 Subject: [PATCH] bugs --- addon.c | 4 +++- gameserver.c | 4 ++-- player_remote.c | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/addon.c b/addon.c index 4ac9f91..09cb43b 100644 --- a/addon.c +++ b/addon.c @@ -109,8 +109,10 @@ static int addon_uid_to_alias( char uid[ADDON_UID_MAX], addon_alias *alias ){ if( !strcmp(location,"steam") ) alias->workshop_id = atoll( uid+12 ); - else if( !strcmp(location,"local") ) + else if( !strcmp(location,"local") ){ + alias->workshop_id = 0; vg_strncpy( uid+12, alias->foldername, 64, k_strncpy_always_add_null ); + } else return 0; diff --git a/gameserver.c b/gameserver.c index abd5aaa..b6ca210 100644 --- a/gameserver.c +++ b/gameserver.c @@ -349,8 +349,8 @@ static void gameserver_rx_200_300( SteamNetworkingMessage_t *msg ){ u32 chs = vg_strncpy( client->username, prop->name, name_len, k_strncpy_always_add_null ); - vg_info( "client #%d changed name to: %s\n", client_id, - client->username ); + vg_info( "client #%d changed name to: %s [%s]\n", client_id, + client->username, prop->name ); u32 propsize = sizeof(netmsg_playerusername) + chs + 1; gameserver_send_to_all( client_id, prop, propsize, diff --git a/player_remote.c b/player_remote.c index 3d674bc..f81cdf5 100644 --- a/player_remote.c +++ b/player_remote.c @@ -75,7 +75,8 @@ static void player_remote_rx_200_300( SteamNetworkingMessage_t *msg ){ network_msgstring( update->name, msg->m_cbSize, sizeof(*update), player->username, sizeof(player->username) ); - vg_info( "#%u changed username to: %s\n", player->username ); + vg_info( "#%u changed username to: %s\n", + update->index, player->username ); } else { vg_error( "inetmsg_playerleave: player index out of range\n" ); -- 2.25.1