Skip to content

Commit

Permalink
support server browser ip protocol filtering
Browse files Browse the repository at this point in the history
Filter servers by ip protocol so dual ip servers with both ipv4 and ipv6 addresses are only displayed once.
  • Loading branch information
Chomenor committed Nov 15, 2022
1 parent f98755c commit 3053e99
Show file tree
Hide file tree
Showing 4 changed files with 157 additions and 7 deletions.
12 changes: 12 additions & 0 deletions code/ui/ui_atoms.c
Original file line number Diff line number Diff line change
Expand Up @@ -2093,6 +2093,8 @@ void UI_LoadMenuText()
menu_normal_text[MNT_SHORTCUT_VOTE_NO] = "VOTE NO";
menu_normal_text[MNT_SHORTCUT_MINIMIZE] = "MINIMIZE";
menu_normal_text[MNT_SHORTCUT_QUIT] = "QUIT";
menu_normal_text[MNT_BROWSER_PREFER_IPV4] = "PREFER IPV4";
menu_normal_text[MNT_BROWSER_PREFER_IPV6] = "PREFER IPV6";
menu_normal_text[MNT_BROWSER_PLAYER_COUNT] = "PLAYER COUNT";
menu_normal_text[MNT_BROWSER_HUMANS_ONLY] = "HUMAN PLAYERS ONLY";
menu_normal_text[MNT_BROWSER_BOTS_AND_HUMANS] = "BOTS OR HUMANS";
Expand Down Expand Up @@ -2129,6 +2131,8 @@ void UI_LoadMenuText()
menu_normal_text[MNT_SHORTCUT_VOTE_NO] = "STIMME NEIN";
menu_normal_text[MNT_SHORTCUT_MINIMIZE] = "MINIMIEREN";
menu_normal_text[MNT_SHORTCUT_QUIT] = "VERLASSEN";
menu_normal_text[MNT_BROWSER_PREFER_IPV4] = "BEVORZUGEN IPV4";
menu_normal_text[MNT_BROWSER_PREFER_IPV6] = "BEVORZUGEN IPV6";
menu_normal_text[MNT_BROWSER_PLAYER_COUNT] = "SPIELERZAHL";
menu_normal_text[MNT_BROWSER_HUMANS_ONLY] = "NUR MENSCHLICHE SPIELER";
menu_normal_text[MNT_BROWSER_BOTS_AND_HUMANS] = "BOTS ODER MENSCHEN";
Expand Down Expand Up @@ -2173,6 +2177,8 @@ void UI_LoadMenuText()
menu_normal_text[MNT_SHORTCUT_VOTE_NO] = "VOTE NON";
menu_normal_text[MNT_SHORTCUT_MINIMIZE] = "MINIMISER";
menu_normal_text[MNT_SHORTCUT_QUIT] = "QUITTER";
menu_normal_text[MNT_BROWSER_PREFER_IPV4] = "PRÉFÉREZ IPV4";
menu_normal_text[MNT_BROWSER_PREFER_IPV6] = "PRÉFÉREZ IPV6";
menu_normal_text[MNT_BROWSER_PLAYER_COUNT] = "NOMBRE DE JOUEURS";
menu_normal_text[MNT_BROWSER_HUMANS_ONLY] = "JOUEURS HUMAINS UNIQUEMENT";
menu_normal_text[MNT_BROWSER_BOTS_AND_HUMANS] = "BOTS OU HUMAINS";
Expand Down Expand Up @@ -2333,6 +2339,8 @@ void UI_LoadButtonText()
menu_button_text[MBT_CENTERHUD][1] = "MOVE HUD TOWARDS CENTER OF SCREEN";
menu_button_text[MBT_BROWSER_PLAYERTYPE][0] = "PLAYER TYPE";
menu_button_text[MBT_BROWSER_PLAYERTYPE][1] = "FILTER BY AMOUNT OF PLAYERS ON SERVER";
menu_button_text[MBT_BROWSER_IPPROTOCOL][0] = "PROTOCOL";
menu_button_text[MBT_BROWSER_IPPROTOCOL][1] = "SELECT PREFERRED PROTOCOL FOR DUAL-IP SERVERS";
menu_button_text[MBT_SOUND_OPENAL][0] = "OPENAL";
menu_button_text[MBT_SOUND_OPENAL][1] = "OPENAL SOUND ON/OFF.";
menu_button_text[MBT_SOUND_GENERAL_VOLUME][0] = "GENERAL VOLUME";
Expand Down Expand Up @@ -2426,6 +2434,8 @@ void UI_LoadButtonText()
menu_button_text[MBT_CENTERHUD][1] = "HUD ZUR MITTE DES BILDSCHIRMS VERSCHIEBEN";
menu_button_text[MBT_BROWSER_PLAYERTYPE][0] = "SPIELERTYP";
menu_button_text[MBT_BROWSER_PLAYERTYPE][1] = "FILTER NACH ANZAHL DER SPIELER AUF DEM SERVER";
menu_button_text[MBT_BROWSER_IPPROTOCOL][0] = "PROTOKOLL";
menu_button_text[MBT_BROWSER_IPPROTOCOL][1] = "BEVORZUGTES PROTOKOLL FÜR DUAL-IP-SERVER AUSWÄHLEN";
menu_button_text[MBT_SOUND_OPENAL][1] = "OPENAL-SOUND EIN/AUS";
menu_button_text[MBT_SOUND_GENERAL_VOLUME][0] = "GESAMTLAUTSTÄRKE";
menu_button_text[MBT_SOUND_GENERAL_VOLUME][1] = "LAUTSTÄRKE FÜR ALLE IN-GAME-AUDIO.";
Expand Down Expand Up @@ -2528,6 +2538,8 @@ void UI_LoadButtonText()
menu_button_text[MBT_CENTERHUD][1] = "DÉPLACER LE HUD VERS LE CENTRE DE L'ÉCRAN";
menu_button_text[MBT_BROWSER_PLAYERTYPE][0] = "TYPE DE JOUEUR";
menu_button_text[MBT_BROWSER_PLAYERTYPE][1] = "FILTREZ PAR QUANTITÉ DE JOUEURS SUR SERVEUR";
menu_button_text[MBT_BROWSER_IPPROTOCOL][0] = "PROTOCOLE";
menu_button_text[MBT_BROWSER_IPPROTOCOL][1] = "SÉLECTIONNER LE PROTOCOLE IP PRÉFÉRÉ";
menu_button_text[MBT_SOUND_OPENAL][1] = "SON OPENAL ON/OFF";
menu_button_text[MBT_SOUND_GENERAL_VOLUME][0] = "VOLUME GÉNÉRAL";
menu_button_text[MBT_SOUND_GENERAL_VOLUME][1] = "VOLUME POUR TOUS LES AUDIO DU JEU.";
Expand Down
4 changes: 4 additions & 0 deletions code/ui/ui_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,8 @@ typedef enum
MNT_SHORTCUT_VOTE_NO,
MNT_SHORTCUT_MINIMIZE,
MNT_SHORTCUT_QUIT,
MNT_BROWSER_PREFER_IPV4,
MNT_BROWSER_PREFER_IPV6,
MNT_BROWSER_PLAYER_COUNT,
MNT_BROWSER_HUMANS_ONLY,
MNT_BROWSER_BOTS_AND_HUMANS,
Expand Down Expand Up @@ -954,6 +956,7 @@ typedef enum
MBT_ASPECTCORRECTION,
MBT_CENTERHUD,
MBT_BROWSER_PLAYERTYPE,
MBT_BROWSER_IPPROTOCOL,
MBT_SOUND_OPENAL,
MBT_SOUND_GENERAL_VOLUME,
MBT_CONTROLS_OTHER_KEYS,
Expand Down Expand Up @@ -1053,6 +1056,7 @@ extern vmCvar_t ui_team_race_red;
extern vmCvar_t ui_spSelection;

extern vmCvar_t ui_browserMaster;
extern vmCvar_t ui_browserIpProtocol;
extern vmCvar_t ui_browserGameType;
extern vmCvar_t ui_browserSortKey;
extern vmCvar_t ui_browserSortKey2;
Expand Down
2 changes: 2 additions & 0 deletions code/ui/ui_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ vmCvar_t ui_pModElimination;
vmCvar_t ui_spSelection;

vmCvar_t ui_browserMaster;
vmCvar_t ui_browserIpProtocol;
vmCvar_t ui_browserGameType;
vmCvar_t ui_browserSortKey;
vmCvar_t ui_browserSortKey2;
Expand Down Expand Up @@ -205,6 +206,7 @@ cvarTable_t cvarTable[] = {
{ &ui_spSelection, "ui_spSelection", "", CVAR_ROM },

{ &ui_browserMaster, "ui_browserMaster", "0", CVAR_ARCHIVE },
{ &ui_browserIpProtocol, "ui_browserIpProtocol", "0", CVAR_ARCHIVE },
{ &ui_browserGameType, "ui_browserGameType", "0", CVAR_ARCHIVE },
{ &ui_browserSortKey, "ui_browserSortKey", "4", CVAR_ARCHIVE },
{ &ui_browserSortKey2, "ui_browserSortKey2", "2", CVAR_ARCHIVE },
Expand Down
Loading

0 comments on commit 3053e99

Please sign in to comment.