diff --git a/lib/coopnet/include/libcoopnet.h b/lib/coopnet/include/libcoopnet.h index 82a7db16..09e0e9b3 100644 --- a/lib/coopnet/include/libcoopnet.h +++ b/lib/coopnet/include/libcoopnet.h @@ -50,6 +50,7 @@ CoopNetRc coopnet_begin(const char* aHost, uint32_t aPort); CoopNetRc coopnet_shutdown(void); CoopNetRc coopnet_update(void); CoopNetRc coopnet_lobby_create(const char* aGame, const char* aVersion, const char* aHostName, const char* aMode, uint16_t aMaxConnections, const char* aPassword); +CoopNetRc coopnet_lobby_update(uint64_t aLobbyId, const char* aGame, const char* aVersion, const char* aHostName, const char* aMode); CoopNetRc coopnet_lobby_join(uint64_t aLobbyId, const char* aPassword); CoopNetRc coopnet_lobby_leave(uint64_t aLobbyId); CoopNetRc coopnet_lobby_list_get(const char* aGame, const char* aPassword); diff --git a/lib/coopnet/linux/libcoopnet.a b/lib/coopnet/linux/libcoopnet.a index 76981c8f..40149215 100644 Binary files a/lib/coopnet/linux/libcoopnet.a and b/lib/coopnet/linux/libcoopnet.a differ diff --git a/src/pc/network/coopnet/coopnet.c b/src/pc/network/coopnet/coopnet.c index f4a87031..8c2928ed 100644 --- a/src/pc/network/coopnet/coopnet.c +++ b/src/pc/network/coopnet/coopnet.c @@ -145,12 +145,13 @@ void ns_coopnet_update(void) { coopnet_update(); if (gNetworkType != NT_NONE && sNetworkType != NT_NONE) { if (sNetworkType == NT_SERVER) { + char mode[64] = ""; + mods_get_main_mod_name(mode, 64); if (sReconnecting) { - // TODO: send lobby update packet + LOG_INFO("Update lobby"); + coopnet_lobby_update(sLocalLobbyId, CN_GAME_STR, get_version(), configPlayerName, mode); } else { LOG_INFO("Create lobby"); - char mode[64] = ""; - mods_get_main_mod_name(mode, 64); snprintf(gCoopNetPassword, 64, "%s", configPassword); coopnet_lobby_create(CN_GAME_STR, get_version(), configPlayerName, mode, (uint16_t)configAmountofPlayers, gCoopNetPassword); }