mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 13:35:12 +00:00
Enforce player limit on Direct Connection
This commit is contained in:
parent
fe7006f4d7
commit
460772b31f
13 changed files with 5 additions and 16 deletions
|
@ -22,7 +22,6 @@ IMPORT_FAIL_INGAME = "\\#ffa0a0\\Nelze importovat mod, protože jste ve hře"
|
||||||
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Nezdařilo se připojit na CoopNet!"
|
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Nezdařilo se připojit na CoopNet!"
|
||||||
COOPNET_DISCONNECTED = "\\#ffa0a0\\Ztratilo se připojení na CoopNet!"
|
COOPNET_DISCONNECTED = "\\#ffa0a0\\Ztratilo se připojení na CoopNet!"
|
||||||
LOBBY_NOT_FOUND = "\\#ffa0a0\\Lobby už neexistuje!"
|
LOBBY_NOT_FOUND = "\\#ffa0a0\\Lobby už neexistuje!"
|
||||||
LOBBY_JOIN_FULL = "\\#ffa0a0\\Lobby je plné!"
|
|
||||||
LOBBY_JOIN_FAILED = "\\#ffa0a0\\Nezdařilo se připojit na lobby!"
|
LOBBY_JOIN_FAILED = "\\#ffa0a0\\Nezdařilo se připojit na lobby!"
|
||||||
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Zadali jste špatné heslo!"
|
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Zadali jste špatné heslo!"
|
||||||
COOPNET_VERSION = "\\#ffa0a0\\Vaše verze není kompatibilní s CoopNet. Aktualizujte si verzi!"
|
COOPNET_VERSION = "\\#ffa0a0\\Vaše verze není kompatibilní s CoopNet. Aktualizujte si verzi!"
|
||||||
|
|
|
@ -22,7 +22,6 @@ IMPORT_FAIL_INGAME = "\\#ffa0a0\\Kan niet importen in een spel."
|
||||||
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Kon niet met CoopNet verbinden."
|
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Kon niet met CoopNet verbinden."
|
||||||
COOPNET_DISCONNECTED = "\\#ffa0a0\\Connectie met CoopNet verloren."
|
COOPNET_DISCONNECTED = "\\#ffa0a0\\Connectie met CoopNet verloren."
|
||||||
LOBBY_NOT_FOUND = "\\#ffa0a0\\Deze lobby bestaat niet meer."
|
LOBBY_NOT_FOUND = "\\#ffa0a0\\Deze lobby bestaat niet meer."
|
||||||
LOBBY_JOIN_FULL = "\\#ffa0a0\\Deze lobby is vol."
|
|
||||||
LOBBY_JOIN_FAILED = "\\#ffa0a0\\Gevaalt om met lobby te verbinden."
|
LOBBY_JOIN_FAILED = "\\#ffa0a0\\Gevaalt om met lobby te verbinden."
|
||||||
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Verkeerde lobby wachtwoord."
|
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Verkeerde lobby wachtwoord."
|
||||||
COOPNET_VERSION = "\\#ffa0a0\\Jou versie kan niet meer met CoopNet verbinden. Update je game!"
|
COOPNET_VERSION = "\\#ffa0a0\\Jou versie kan niet meer met CoopNet verbinden. Update je game!"
|
||||||
|
|
|
@ -7,9 +7,9 @@ ENTERED = "@ entered\n#"
|
||||||
SERVER_CLOSED = "\\#ffa0a0\\Disconnected:\\#dcdcdc\\ Server closed"
|
SERVER_CLOSED = "\\#ffa0a0\\Disconnected:\\#dcdcdc\\ Server closed"
|
||||||
DISCORD_ERROR = "Discord threw an error.\nTo fix, try: \n1. Close the game.\n2. Restart Discord.\n3. Start the game."
|
DISCORD_ERROR = "Discord threw an error.\nTo fix, try: \n1. Close the game.\n2. Restart Discord.\n3. Start the game."
|
||||||
DISCORD_DETECT = "\\#ffa0a0\\Error:\\#dcdcdc\\ Could not detect Discord.\n\\#a0a0a0\\Try closing the game, restarting Discord, and opening the game again."
|
DISCORD_DETECT = "\\#ffa0a0\\Error:\\#dcdcdc\\ Could not detect Discord.\n\\#a0a0a0\\Try closing the game, restarting Discord, and opening the game again."
|
||||||
DISCONNECT_FULL = "\\#ffa0a0\\Disconnected:\\#dcdcdc\\ The party is full."
|
DISCONNECT_FULL = "\\#ffa0a0\\Disconnected:\\#dcdcdc\\ The server is full."
|
||||||
DISCONNECT_KICK = "\\#ffa0a0\\Disconnected:\\#dcdcdc\\ The server kicked you."
|
DISCONNECT_KICK = "\\#ffa0a0\\Disconnected:\\#dcdcdc\\ You have been kicked."
|
||||||
DISCONNECT_BAN = "\\#ffa0a0\\Disconnected:\\#dcdcdc\\ The server banned you."
|
DISCONNECT_BAN = "\\#ffa0a0\\Disconnected:\\#dcdcdc\\ You have been banned."
|
||||||
DISCONNECT_REJOIN = "\\#ffa0a0\\Disconnected:\\#dcdcdc\\ Rejoining..."
|
DISCONNECT_REJOIN = "\\#ffa0a0\\Disconnected:\\#dcdcdc\\ Rejoining..."
|
||||||
DISCONNECT_CLOSED = "\\#ffa0a0\\Disconnected:\\#dcdcdc\\ Host closed the connection."
|
DISCONNECT_CLOSED = "\\#ffa0a0\\Disconnected:\\#dcdcdc\\ Host closed the connection."
|
||||||
DISCONNECT_BIG_MOD = "Server had too large of a mod.\nQuitting."
|
DISCONNECT_BIG_MOD = "Server had too large of a mod.\nQuitting."
|
||||||
|
@ -22,7 +22,6 @@ IMPORT_FAIL_INGAME = "\\#ffa0a0\\Can not import while in-game"
|
||||||
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Could not connect to CoopNet!"
|
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Could not connect to CoopNet!"
|
||||||
COOPNET_DISCONNECTED = "\\#ffa0a0\\Lost connection to CoopNet!"
|
COOPNET_DISCONNECTED = "\\#ffa0a0\\Lost connection to CoopNet!"
|
||||||
LOBBY_NOT_FOUND = "\\#ffa0a0\\Error:\\#dcdcdc\\ Lobby no longer exists!"
|
LOBBY_NOT_FOUND = "\\#ffa0a0\\Error:\\#dcdcdc\\ Lobby no longer exists!"
|
||||||
LOBBY_JOIN_FULL = "\\#ffa0a0\\The lobby is full!"
|
|
||||||
LOBBY_JOIN_FAILED = "\\#ffa0a0\\Failed to join the lobby!"
|
LOBBY_JOIN_FAILED = "\\#ffa0a0\\Failed to join the lobby!"
|
||||||
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Entered the wrong lobby password!"
|
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Entered the wrong lobby password!"
|
||||||
COOPNET_VERSION = "\\#ffa0a0\\Your version is no longer compatible with CoopNet. Update the game!"
|
COOPNET_VERSION = "\\#ffa0a0\\Your version is no longer compatible with CoopNet. Update the game!"
|
||||||
|
|
|
@ -22,7 +22,6 @@ IMPORT_FAIL_INGAME = "\\#ffa0a0\\L'importation ne peut pas se faire pendant la p
|
||||||
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\La connexion à CoopNet a échouée!"
|
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\La connexion à CoopNet a échouée!"
|
||||||
COOPNET_DISCONNECTED = "\\#ffa0a0\\Connexion à CoopNet perdue!"
|
COOPNET_DISCONNECTED = "\\#ffa0a0\\Connexion à CoopNet perdue!"
|
||||||
LOBBY_NOT_FOUND = "\\#ffa0a0\\Cette partie n'existe pas!"
|
LOBBY_NOT_FOUND = "\\#ffa0a0\\Cette partie n'existe pas!"
|
||||||
LOBBY_JOIN_FULL = "\\#ffa0a0\\Cette partie est complète!"
|
|
||||||
LOBBY_JOIN_FAILED = "\\#ffa0a0\\La connexion à la partie a échouée!"
|
LOBBY_JOIN_FAILED = "\\#ffa0a0\\La connexion à la partie a échouée!"
|
||||||
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Mot de passe incorrect!"
|
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Mot de passe incorrect!"
|
||||||
COOPNET_VERSION = "\\#ffa0a0\\Votre version n'est plus compatible avec CoopNet. Mettez à jour votre jeu!"
|
COOPNET_VERSION = "\\#ffa0a0\\Votre version n'est plus compatible avec CoopNet. Mettez à jour votre jeu!"
|
||||||
|
|
|
@ -22,7 +22,6 @@ IMPORT_FAIL_INGAME = "\\#ffa0a0\\Kann nicht im Spiel importieren."
|
||||||
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Verbindung zu CoopNet fehlgeschlagen!"
|
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Verbindung zu CoopNet fehlgeschlagen!"
|
||||||
COOPNET_DISCONNECTED = "\\#ffa0a0\\Verbindung zu CoopNet verloren!"
|
COOPNET_DISCONNECTED = "\\#ffa0a0\\Verbindung zu CoopNet verloren!"
|
||||||
LOBBY_NOT_FOUND = "\\#ffa0a0\\Diese Lobby existiert nicht mehr."
|
LOBBY_NOT_FOUND = "\\#ffa0a0\\Diese Lobby existiert nicht mehr."
|
||||||
LOBBY_JOIN_FULL = "\\#ffa0a0\\Diese Lobby ist voll."
|
|
||||||
LOBBY_JOIN_FAILED = "\\#ffa0a0\\Konnte der Lobby nicht beitreten!"
|
LOBBY_JOIN_FAILED = "\\#ffa0a0\\Konnte der Lobby nicht beitreten!"
|
||||||
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Falsches Lobby-Passwort!"
|
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Falsches Lobby-Passwort!"
|
||||||
COOPNET_VERSION = "\\#ffa0a0\\Deine Version ist nicht kompatibel mit CoopNet. Bitte lade die neueste Version des Spiels herunter!"
|
COOPNET_VERSION = "\\#ffa0a0\\Deine Version ist nicht kompatibel mit CoopNet. Bitte lade die neueste Version des Spiels herunter!"
|
||||||
|
|
|
@ -22,7 +22,6 @@ IMPORT_FAIL_INGAME = "\\#ffa0a0\\Impossibile importare durante la partita"
|
||||||
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Could not connect to CoopNet!"
|
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Could not connect to CoopNet!"
|
||||||
COOPNET_DISCONNECTED = "\\#ffa0a0\\Lost connection to CoopNet!"
|
COOPNET_DISCONNECTED = "\\#ffa0a0\\Lost connection to CoopNet!"
|
||||||
LOBBY_NOT_FOUND = "\\#ffa0a0\\The lobby no longer exists!"
|
LOBBY_NOT_FOUND = "\\#ffa0a0\\The lobby no longer exists!"
|
||||||
LOBBY_JOIN_FULL = "\\#ffa0a0\\The lobby is full!"
|
|
||||||
LOBBY_JOIN_FAILED = "\\#ffa0a0\\Failed to join the lobby!"
|
LOBBY_JOIN_FAILED = "\\#ffa0a0\\Failed to join the lobby!"
|
||||||
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Entered the wrong lobby password!"
|
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Entered the wrong lobby password!"
|
||||||
COOPNET_VERSION = "\\#ffa0a0\\Your version is no longer compatible with CoopNet. Update the game!"
|
COOPNET_VERSION = "\\#ffa0a0\\Your version is no longer compatible with CoopNet. Update the game!"
|
||||||
|
|
|
@ -22,7 +22,6 @@ IMPORT_FAIL_INGAME = "\\#ffa0a0\\Nie mozna importowac podczas gry"
|
||||||
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Nie udalo sie polaczyc z CoopNetem!"
|
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Nie udalo sie polaczyc z CoopNetem!"
|
||||||
COOPNET_DISCONNECTED = "\\#ffa0a0\\Utracono polaczenie z CoopNetem!"
|
COOPNET_DISCONNECTED = "\\#ffa0a0\\Utracono polaczenie z CoopNetem!"
|
||||||
LOBBY_NOT_FOUND = "\\#ffa0a0\\Lobby juz nie istnieje!"
|
LOBBY_NOT_FOUND = "\\#ffa0a0\\Lobby juz nie istnieje!"
|
||||||
LOBBY_JOIN_FULL = "\\#ffa0a0\\Lobby jest pelne!"
|
|
||||||
LOBBY_JOIN_FAILED = "\\#ffa0a0\\Nie udalo sie polaczyc z lobby!"
|
LOBBY_JOIN_FAILED = "\\#ffa0a0\\Nie udalo sie polaczyc z lobby!"
|
||||||
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Wprowadzono nieprawidlowe haslo!"
|
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Wprowadzono nieprawidlowe haslo!"
|
||||||
COOPNET_VERSION = "\\#ffa0a0\\Twoja wersja gre nie jest juz kompatybilna z CoopNetem. Zaktualizuj gre!"
|
COOPNET_VERSION = "\\#ffa0a0\\Twoja wersja gre nie jest juz kompatybilna z CoopNetem. Zaktualizuj gre!"
|
||||||
|
|
|
@ -22,7 +22,6 @@ IMPORT_FAIL_INGAME = "\\#ffa0a0\\Falha ao importar durante o jogo"
|
||||||
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Não foi possível se conectar ao CoopNet!"
|
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Não foi possível se conectar ao CoopNet!"
|
||||||
COOPNET_DISCONNECTED = "\\#ffa0a0\\A conexão ao CoopNet foi perdida!"
|
COOPNET_DISCONNECTED = "\\#ffa0a0\\A conexão ao CoopNet foi perdida!"
|
||||||
LOBBY_NOT_FOUND = "\\#ffa0a0\\Essa partida não está mais ativa!"
|
LOBBY_NOT_FOUND = "\\#ffa0a0\\Essa partida não está mais ativa!"
|
||||||
LOBBY_JOIN_FULL = "\\#ffa0a0\\A partida está cheia!"
|
|
||||||
LOBBY_JOIN_FAILED = "\\#ffa0a0\\Falha ao entrar na partida!"
|
LOBBY_JOIN_FAILED = "\\#ffa0a0\\Falha ao entrar na partida!"
|
||||||
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Senha incorreta!"
|
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Senha incorreta!"
|
||||||
COOPNET_VERSION = "\\#ffa0a0\\A sua versão não é mais compatível com o CoopNet. Atualize o jogo!"
|
COOPNET_VERSION = "\\#ffa0a0\\A sua versão não é mais compatível com o CoopNet. Atualize o jogo!"
|
||||||
|
|
|
@ -22,7 +22,6 @@ IMPORT_FAIL_INGAME = "\\#ffa0a0\\Невозможно импортировать
|
||||||
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Не удалось установить соединение с CoopNet!"
|
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Не удалось установить соединение с CoopNet!"
|
||||||
COOPNET_DISCONNECTED = "\\#ffa0a0\\Потеря соединения с CoopNet!"
|
COOPNET_DISCONNECTED = "\\#ffa0a0\\Потеря соединения с CoopNet!"
|
||||||
LOBBY_NOT_FOUND = "\\#ffa0a0\\Группа больше не существует!"
|
LOBBY_NOT_FOUND = "\\#ffa0a0\\Группа больше не существует!"
|
||||||
LOBBY_JOIN_FULL = "\\#ffa0a0\\Группа заполнена!"
|
|
||||||
LOBBY_JOIN_FAILED = "\\#ffa0a0\\Не удалось присоединиться к Группе!"
|
LOBBY_JOIN_FAILED = "\\#ffa0a0\\Не удалось присоединиться к Группе!"
|
||||||
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Введен неверный пароль группы!"
|
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\Введен неверный пароль группы!"
|
||||||
COOPNET_VERSION = "\\#ffa0a0\\Ваша версия больше не совместима с CoopNet. Обновите игру!"
|
COOPNET_VERSION = "\\#ffa0a0\\Ваша версия больше не совместима с CoopNet. Обновите игру!"
|
||||||
|
|
|
@ -22,7 +22,6 @@ IMPORT_FAIL_INGAME = "\\#ffa0a0\\No se pueden importar archivos\nen medio de una
|
||||||
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\¡No se ha podido conectar a CoopNet!"
|
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\¡No se ha podido conectar a CoopNet!"
|
||||||
COOPNET_DISCONNECTED = "\\#ffa0a0\\¡Se ha perdido la conexión a CoopNet!"
|
COOPNET_DISCONNECTED = "\\#ffa0a0\\¡Se ha perdido la conexión a CoopNet!"
|
||||||
LOBBY_NOT_FOUND = "\\#ffa0a0\\¡La partida ya no existe!"
|
LOBBY_NOT_FOUND = "\\#ffa0a0\\¡La partida ya no existe!"
|
||||||
LOBBY_JOIN_FULL = "\\#ffa0a0\\¡La partida está llena!"
|
|
||||||
LOBBY_JOIN_FAILED = "\\#ffa0a0\\¡Error al unirse a la partida!"
|
LOBBY_JOIN_FAILED = "\\#ffa0a0\\¡Error al unirse a la partida!"
|
||||||
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\¡Contraseña de partida incorrecta!"
|
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\¡Contraseña de partida incorrecta!"
|
||||||
COOPNET_VERSION = "\\#ffa0a0\\Tu versión ya no es compatible con CoopNet. ¡Actualiza el juego!"
|
COOPNET_VERSION = "\\#ffa0a0\\Tu versión ya no es compatible con CoopNet. ¡Actualiza el juego!"
|
||||||
|
|
|
@ -22,7 +22,6 @@ IMPORT_FAIL_INGAME = "\\#ffa0a0\\No se pueden importar archivos\nen medio de una
|
||||||
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\¡No se pudo conectar a CoopNet!"
|
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\¡No se pudo conectar a CoopNet!"
|
||||||
COOPNET_DISCONNECTED = "\\#ffa0a0\\¡Se perdió la conexión a CoopNet!"
|
COOPNET_DISCONNECTED = "\\#ffa0a0\\¡Se perdió la conexión a CoopNet!"
|
||||||
LOBBY_NOT_FOUND = "\\#ffa0a0\\¡La partida ya no existe!"
|
LOBBY_NOT_FOUND = "\\#ffa0a0\\¡La partida ya no existe!"
|
||||||
LOBBY_JOIN_FULL = "\\#ffa0a0\\¡La partida está llena!"
|
|
||||||
LOBBY_JOIN_FAILED = "\\#ffa0a0\\¡Error al unirse a la partida!"
|
LOBBY_JOIN_FAILED = "\\#ffa0a0\\¡Error al unirse a la partida!"
|
||||||
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\¡Contraseña de partida incorrecta!"
|
LOBBY_PASSWORD_INCORRECT = "\\#ffa0a0\\¡Contraseña de partida incorrecta!"
|
||||||
COOPNET_VERSION = "\\#ffa0a0\\Tu versión ya no es compatible con CoopNet. ¡Actualiza el juego!"
|
COOPNET_VERSION = "\\#ffa0a0\\Tu versión ya no es compatible con CoopNet. ¡Actualiza el juego!"
|
||||||
|
|
|
@ -123,7 +123,7 @@ static void coopnet_on_error(enum MPacketErrorNumber error, uint64_t tag) {
|
||||||
network_shutdown(false, false, false, false);
|
network_shutdown(false, false, false, false);
|
||||||
break;
|
break;
|
||||||
case MERR_LOBBY_JOIN_FULL:
|
case MERR_LOBBY_JOIN_FULL:
|
||||||
djui_popup_create(DLANG(NOTIF, LOBBY_JOIN_FULL), 2);
|
djui_popup_create(DLANG(NOTIF, DISCONNECT_FULL), 2);
|
||||||
network_shutdown(false, false, false, false);
|
network_shutdown(false, false, false, false);
|
||||||
break;
|
break;
|
||||||
case MERR_LOBBY_JOIN_FAILED:
|
case MERR_LOBBY_JOIN_FAILED:
|
||||||
|
|
|
@ -86,7 +86,7 @@ void network_send_join(struct Packet* joinRequestPacket) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (globalIndex == UNKNOWN_LOCAL_INDEX) {
|
if (globalIndex == UNKNOWN_LOCAL_INDEX || globalIndex >= network_player_connected_count()) {
|
||||||
network_send_kick(0, EKT_FULL_PARTY);
|
network_send_kick(0, EKT_FULL_PARTY);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue