mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 12:05:11 +00:00
tell coopnet that our build is sm64ex-coop v37 (#7)
This commit is contained in:
parent
a2fd2983b2
commit
d55f6ec277
1 changed files with 18 additions and 4 deletions
|
@ -13,6 +13,20 @@
|
|||
#include "pc/discord/discord.h"
|
||||
#endif
|
||||
|
||||
// ! Temporary, show this build of coop as sm64ex-coop
|
||||
// to let other players know the update is out
|
||||
#undef GAME_NAME
|
||||
#define GAME_NAME "sm64ex-coop"
|
||||
static char sVersionString[MAX_VERSION_LENGTH] = { 0 };
|
||||
const char* get_version_online(void) {
|
||||
#if defined(VERSION_US)
|
||||
snprintf(sVersionString, MAX_VERSION_LENGTH, "%s%d", VERSION_TEXT, VERSION_NUMBER);
|
||||
#else
|
||||
snprintf(sVersionString, MAX_VERSION_LENGTH, "%s%d %s", VERSION_TEXT, VERSION_NUMBER, VERSION_REGION);
|
||||
#endif
|
||||
return sVersionString;
|
||||
}
|
||||
|
||||
#ifdef COOPNET
|
||||
|
||||
uint64_t gCoopNetDesiredLobby = 0;
|
||||
|
@ -173,7 +187,7 @@ static void coopnet_populate_description(void) {
|
|||
char* buffer = sCoopNetDescription;
|
||||
int bufferLength = 512;
|
||||
// get version
|
||||
const char* version = get_version();
|
||||
const char* version = get_version_online();
|
||||
int versionLength = strlen(version);
|
||||
snprintf(buffer, bufferLength, "%s", version);
|
||||
buffer += versionLength;
|
||||
|
@ -208,12 +222,12 @@ void ns_coopnet_update(void) {
|
|||
if (sReconnecting) {
|
||||
LOG_INFO("Update lobby");
|
||||
coopnet_populate_description();
|
||||
coopnet_lobby_update(sLocalLobbyId, GAME_NAME, get_version(), configPlayerName, mode, sCoopNetDescription);
|
||||
coopnet_lobby_update(sLocalLobbyId, GAME_NAME, get_version_online(), configPlayerName, mode, sCoopNetDescription);
|
||||
} else {
|
||||
LOG_INFO("Create lobby");
|
||||
snprintf(gCoopNetPassword, 64, "%s", configPassword);
|
||||
coopnet_populate_description();
|
||||
coopnet_lobby_create(GAME_NAME, get_version(), configPlayerName, mode, (uint16_t)configAmountofPlayers, gCoopNetPassword, sCoopNetDescription);
|
||||
coopnet_lobby_create(GAME_NAME, get_version_online(), configPlayerName, mode, (uint16_t)configAmountofPlayers, gCoopNetPassword, sCoopNetDescription);
|
||||
}
|
||||
} else if (sNetworkType == NT_CLIENT) {
|
||||
LOG_INFO("Join lobby");
|
||||
|
|
Loading…
Reference in a new issue