Remove temporary ex-coop CoopNet versioning (#521)

* Remove temporary ex-coop CoopNet versioning

* don't need this anymore
This commit is contained in:
Cooliokid956 2024-11-25 00:50:10 -06:00 committed by GitHub
parent 39826deadd
commit 70866a66e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 29 deletions

View file

@ -78,7 +78,6 @@ void djui_panel_join_query(uint64_t aLobbyId, UNUSED uint64_t aOwnerId, uint16_t
if (!sLobbyLayout) { return; }
if (!sLobbyPaginated) { return; }
if (aMaxConnections > MAX_PLAYERS) { return; }
if (strstr(aVersion, "v36") || strstr(aVersion, "beta")) { return; }
char playerText[64] = "";
snprintf(playerText, 63, "%u/%u", aConnections, aMaxConnections);
@ -88,7 +87,7 @@ void djui_panel_join_query(uint64_t aLobbyId, UNUSED uint64_t aOwnerId, uint16_t
snprintf(mode, 64, "%s", aMode);
char version[MAX_VERSION_LENGTH] = { 0 };
snprintf(version, MAX_VERSION_LENGTH, "%s", get_version_online());
snprintf(version, MAX_VERSION_LENGTH, "%s", get_version());
bool disabled = strcmp(version, aVersion) != 0;
if (disabled) {
snprintf(mode, 64, "\\#ff0000\\[%s]", aVersion);

View file

@ -15,11 +15,6 @@
#ifdef COOPNET
// ! 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"
#define MAX_COOPNET_DESCRIPTION_LENGTH 1024
uint64_t gCoopNetDesiredLobby = 0;
@ -180,7 +175,7 @@ static void coopnet_populate_description(void) {
char* buffer = sCoopNetDescription;
int bufferLength = MAX_COOPNET_DESCRIPTION_LENGTH;
// get version
const char* version = get_version_online();
const char* version = get_version();
int versionLength = strlen(version);
snprintf(buffer, bufferLength, "%s", version);
buffer += versionLength;
@ -215,12 +210,12 @@ void ns_coopnet_update(void) {
if (sReconnecting) {
LOG_INFO("Update lobby");
coopnet_populate_description();
coopnet_lobby_update(sLocalLobbyId, GAME_NAME, get_version_online(), configPlayerName, mode, sCoopNetDescription);
coopnet_lobby_update(sLocalLobbyId, GAME_NAME, get_version(), configPlayerName, mode, sCoopNetDescription);
} else {
LOG_INFO("Create lobby");
snprintf(gCoopNetPassword, 64, "%s", configPassword);
coopnet_populate_description();
coopnet_lobby_create(GAME_NAME, get_version_online(), configPlayerName, mode, (uint16_t)configAmountofPlayers, gCoopNetPassword, sCoopNetDescription);
coopnet_lobby_create(GAME_NAME, get_version(), configPlayerName, mode, (uint16_t)configAmountofPlayers, gCoopNetPassword, sCoopNetDescription);
}
} else if (sNetworkType == NT_CLIENT) {
LOG_INFO("Join lobby");

View file

@ -12,21 +12,4 @@ const char* get_version(void) {
snprintf(sVersionString, MAX_VERSION_LENGTH, "%s %s", SM64COOPDX_VERSION, VERSION_REGION);
#endif
return sVersionString;
}
const char* get_version_online(void) {
#if defined(VERSION_US)
if (MINOR_VERSION_NUMBER > 0) {
snprintf(sOnlineVersionString, MAX_VERSION_LENGTH, "%s%d.%d", VERSION_TEXT, VERSION_NUMBER, MINOR_VERSION_NUMBER);
} else {
snprintf(sOnlineVersionString, MAX_VERSION_LENGTH, "%s%d", VERSION_TEXT, VERSION_NUMBER);
}
#else
if (MINOR_VERSION_NUMBER > 0) {
snprintf(sOnlineVersionString, MAX_VERSION_LENGTH, "%s%d.%d %s", VERSION_TEXT, VERSION_NUMBER, MINOR_VERSION_NUMBER, VERSION_REGION);
} else {
snprintf(sOnlineVersionString, MAX_VERSION_LENGTH, "%s%d %s", VERSION_TEXT, VERSION_NUMBER, VERSION_REGION);
}
#endif
return sOnlineVersionString;
}
}

View file

@ -29,6 +29,5 @@
#define MAX_VERSION_LENGTH 32
const char* get_version(void);
const char* get_version_online(void);
#endif