mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Remove temporary ex-coop CoopNet versioning (#521)
* Remove temporary ex-coop CoopNet versioning * don't need this anymore
This commit is contained in:
parent
39826deadd
commit
70866a66e3
4 changed files with 5 additions and 29 deletions
|
|
@ -78,7 +78,6 @@ void djui_panel_join_query(uint64_t aLobbyId, UNUSED uint64_t aOwnerId, uint16_t
|
||||||
if (!sLobbyLayout) { return; }
|
if (!sLobbyLayout) { return; }
|
||||||
if (!sLobbyPaginated) { return; }
|
if (!sLobbyPaginated) { return; }
|
||||||
if (aMaxConnections > MAX_PLAYERS) { return; }
|
if (aMaxConnections > MAX_PLAYERS) { return; }
|
||||||
if (strstr(aVersion, "v36") || strstr(aVersion, "beta")) { return; }
|
|
||||||
|
|
||||||
char playerText[64] = "";
|
char playerText[64] = "";
|
||||||
snprintf(playerText, 63, "%u/%u", aConnections, aMaxConnections);
|
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);
|
snprintf(mode, 64, "%s", aMode);
|
||||||
|
|
||||||
char version[MAX_VERSION_LENGTH] = { 0 };
|
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;
|
bool disabled = strcmp(version, aVersion) != 0;
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
snprintf(mode, 64, "\\#ff0000\\[%s]", aVersion);
|
snprintf(mode, 64, "\\#ff0000\\[%s]", aVersion);
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,6 @@
|
||||||
|
|
||||||
#ifdef COOPNET
|
#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
|
#define MAX_COOPNET_DESCRIPTION_LENGTH 1024
|
||||||
|
|
||||||
uint64_t gCoopNetDesiredLobby = 0;
|
uint64_t gCoopNetDesiredLobby = 0;
|
||||||
|
|
@ -180,7 +175,7 @@ static void coopnet_populate_description(void) {
|
||||||
char* buffer = sCoopNetDescription;
|
char* buffer = sCoopNetDescription;
|
||||||
int bufferLength = MAX_COOPNET_DESCRIPTION_LENGTH;
|
int bufferLength = MAX_COOPNET_DESCRIPTION_LENGTH;
|
||||||
// get version
|
// get version
|
||||||
const char* version = get_version_online();
|
const char* version = get_version();
|
||||||
int versionLength = strlen(version);
|
int versionLength = strlen(version);
|
||||||
snprintf(buffer, bufferLength, "%s", version);
|
snprintf(buffer, bufferLength, "%s", version);
|
||||||
buffer += versionLength;
|
buffer += versionLength;
|
||||||
|
|
@ -215,12 +210,12 @@ void ns_coopnet_update(void) {
|
||||||
if (sReconnecting) {
|
if (sReconnecting) {
|
||||||
LOG_INFO("Update lobby");
|
LOG_INFO("Update lobby");
|
||||||
coopnet_populate_description();
|
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 {
|
} else {
|
||||||
LOG_INFO("Create lobby");
|
LOG_INFO("Create lobby");
|
||||||
snprintf(gCoopNetPassword, 64, "%s", configPassword);
|
snprintf(gCoopNetPassword, 64, "%s", configPassword);
|
||||||
coopnet_populate_description();
|
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) {
|
} else if (sNetworkType == NT_CLIENT) {
|
||||||
LOG_INFO("Join lobby");
|
LOG_INFO("Join lobby");
|
||||||
|
|
|
||||||
|
|
@ -12,21 +12,4 @@ const char* get_version(void) {
|
||||||
snprintf(sVersionString, MAX_VERSION_LENGTH, "%s %s", SM64COOPDX_VERSION, VERSION_REGION);
|
snprintf(sVersionString, MAX_VERSION_LENGTH, "%s %s", SM64COOPDX_VERSION, VERSION_REGION);
|
||||||
#endif
|
#endif
|
||||||
return sVersionString;
|
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;
|
|
||||||
}
|
|
||||||
|
|
@ -29,6 +29,5 @@
|
||||||
#define MAX_VERSION_LENGTH 32
|
#define MAX_VERSION_LENGTH 32
|
||||||
|
|
||||||
const char* get_version(void);
|
const char* get_version(void);
|
||||||
const char* get_version_online(void);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue