Commit MetaInfo

Revisiona040fb4c3bf1dd475ca5310286903a8ff69af6f0 (tree)
Time2021-11-08 05:16:00
AuthorSean Baggaley <sean@csnx...>
CommiterSean Baggaley

Log Message

Added new nextmap and nextsecret vote types.

Change Summary

Incremental Difference

diff -r 7d7d643fa942 -r a040fb4c3bf1 docs/zandronum-history.txt
--- a/docs/zandronum-history.txt Sun Nov 07 11:40:10 2021 -0500
+++ b/docs/zandronum-history.txt Sun Nov 07 20:16:00 2021 +0000
@@ -61,6 +61,7 @@
6161 + - Added DMFlags: "sv_shootthroughallies" and "sv_dontpushallies", so a player's attacks can pass through and not push their allies. [Kaminsky]
6262 + - Added packet loss mitigation, which the client can control using the CVar "cl_backupcommands". [Kaminsky]
6363 + - Added the server CVAR "sv_country", which allows servers to present their country to launchers. [Sean]
64++ - Added the new nextmap and nextsecret vote types. [Sean]
6465 - - Fixed: Bots tries to jump to reach item when sv_nojump is true. [sleep]
6566 - - Fixed: ACS function SetSkyScrollSpeed didn't work online. [Edward-san]
6667 - - Fixed: color codes in callvote reasons weren't terminated properly. [Dusk]
diff -r 7d7d643fa942 -r a040fb4c3bf1 src/callvote.cpp
--- a/src/callvote.cpp Sun Nov 07 11:40:10 2021 -0500
+++ b/src/callvote.cpp Sun Nov 07 20:16:00 2021 +0000
@@ -101,6 +101,7 @@
101101 static bool callvote_CheckValidity( FString &Command, FString &Parameters );
102102 static ULONG callvote_GetVoteType( const char *pszCommand );
103103 static bool callvote_IsKickVote( const ULONG ulVoteType );
104+static bool callvote_VoteRequiresParameter( const ULONG ulVoteType );
104105 static bool callvote_IsFlagValid( const char *pszName );
105106
106107 //*****************************************************************************
@@ -352,8 +353,13 @@
352353
353354 // Create the vote console command.
354355 g_VoteCommand = Command;
355- g_VoteCommand += " ";
356- g_VoteCommand += Parameters;
356+ // [SB] Only include parameters if there actually are any
357+ if ( Parameters.Len() > 0 )
358+ {
359+ g_VoteCommand += " ";
360+ g_VoteCommand += Parameters;
361+ }
362+
357363 g_ulVoteCaller = ulPlayer;
358364 g_VoteReason = Reason.Left(25);
359365
@@ -1073,6 +1079,19 @@
10731079 Parameters.Format( "%s", parameterInt ? "true" : "false" );
10741080 }
10751081 break;
1082+ case VOTECMD_NEXTMAP:
1083+ case VOTECMD_NEXTSECRET:
1084+ {
1085+ const char *next = ( ulVoteCmd == VOTECMD_NEXTSECRET ? G_GetSecretExitMap() : G_GetExitMap() );
1086+
1087+ if ( !next || !P_CheckIfMapExists( next ) )
1088+ {
1089+ SERVER_PrintfPlayer( SERVER_GetCurrentClient( ), "There is no next map, or it does not exist.\n" );
1090+ return ( false );
1091+ }
1092+ }
1093+ break;
1094+
10761095 default:
10771096
10781097 return ( false );
@@ -1104,6 +1123,10 @@
11041123 return VOTECMD_DUELLIMIT;
11051124 else if ( stricmp( "pointlimit", pszCommand ) == 0 )
11061125 return VOTECMD_POINTLIMIT;
1126+ else if ( stricmp( "nextmap", pszCommand ) == 0 )
1127+ return VOTECMD_NEXTMAP;
1128+ else if ( stricmp( "nextsecret", pszCommand ) == 0 )
1129+ return VOTECMD_NEXTSECRET;
11071130 else if ( callvote_IsFlagValid( pszCommand ))
11081131 return VOTECMD_FLAG;
11091132
@@ -1119,6 +1142,21 @@
11191142
11201143 //*****************************************************************************
11211144 //
1145+static bool callvote_VoteRequiresParameter( const ULONG ulVoteType )
1146+{
1147+ switch ( ulVoteType )
1148+ {
1149+ case VOTECMD_NEXTMAP:
1150+ case VOTECMD_NEXTSECRET:
1151+ return ( false );
1152+
1153+ default:
1154+ return ( true );
1155+ }
1156+}
1157+
1158+//*****************************************************************************
1159+//
11221160 static bool callvote_IsFlagValid( const char *pszName )
11231161 {
11241162 // [AK] Check to make sure the CVar the client sent by name actually exists.
@@ -1172,6 +1210,8 @@
11721210 CVAR( Bool, sv_noduellimitvote, false, CVAR_ARCHIVE | CVAR_SERVERINFO );
11731211 CVAR( Bool, sv_nopointlimitvote, false, CVAR_ARCHIVE | CVAR_SERVERINFO );
11741212 CVAR( Bool, sv_noflagvote, true, CVAR_ARCHIVE | CVAR_SERVERINFO );
1213+CVAR( Bool, sv_nonextmapvote, false, CVAR_ARCHIVE | CVAR_SERVERINFO );
1214+CVAR( Bool, sv_nonextsecretvote, false, CVAR_ARCHIVE | CVAR_SERVERINFO );
11751215 CVAR( Int, sv_votecooldown, 5, CVAR_ARCHIVE | CVAR_SERVERINFO );
11761216 CVAR( Int, sv_voteconnectwait, 0, CVAR_ARCHIVE | CVAR_SERVERINFO ); // [RK] The amount of seconds after client connect to wait before voting
11771217 CVAR( Bool, cl_showfullscreenvote, false, CVAR_ARCHIVE );
@@ -1182,6 +1222,9 @@
11821222 ULONG ulVoteCmd;
11831223 char szArgument[128];
11841224
1225+ // [SB] Prevent the arguments buffer from being full of garbage when the vote has no parameters
1226+ szArgument[0] = '\0';
1227+
11851228 // Don't allow a vote unless the player is a client.
11861229 if ( NETWORK_GetState( ) != NETSTATE_CLIENT )
11871230 {
@@ -1192,9 +1235,9 @@
11921235 if ( CLIENT_GetConnectionState( ) != CTS_ACTIVE )
11931236 return;
11941237
1195- if ( argv.argc( ) < 3 )
1238+ if ( argv.argc( ) < 2 )
11961239 {
1197- Printf( "callvote <command> <parameters> [reason]: Calls a vote\n" );
1240+ Printf( "callvote <command> [parameters] [reason]: Calls a vote\n" );
11981241 return;
11991242 }
12001243
@@ -1212,14 +1255,23 @@
12121255 return;
12131256 }
12141257
1258+ bool requiresParameter = callvote_VoteRequiresParameter( ulVoteCmd );
1259+
1260+ if ( requiresParameter && argv.argc( ) < 3 )
1261+ {
1262+ Printf( "That vote type requires a parameter.\n" );
1263+ return;
1264+ }
1265+
12151266 // [AK] If we're calling a flag vote, put the CVar's name and the parameter together.
12161267 if ( ulVoteCmd == VOTECMD_FLAG )
12171268 sprintf( szArgument, "%s %s", argv[1], argv[2] );
1218- else
1269+ else if ( requiresParameter )
12191270 sprintf( szArgument, "%s", argv[2] );
12201271
1221- if ( argv.argc( ) >= 4 )
1222- CLIENTCOMMANDS_CallVote( ulVoteCmd, szArgument, argv[3] );
1272+ int reasonOffset = requiresParameter ? 1 : 0;
1273+ if ( argv.argc( ) >= 3 + reasonOffset )
1274+ CLIENTCOMMANDS_CallVote( ulVoteCmd, szArgument, argv[2 + reasonOffset] );
12231275 else
12241276 CLIENTCOMMANDS_CallVote( ulVoteCmd, szArgument, "" );
12251277 /*
diff -r 7d7d643fa942 -r a040fb4c3bf1 src/callvote.h
--- a/src/callvote.h Sun Nov 07 11:40:10 2021 -0500
+++ b/src/callvote.h Sun Nov 07 20:16:00 2021 +0000
@@ -78,6 +78,8 @@
7878 VOTECMD_DUELLIMIT,
7979 VOTECMD_POINTLIMIT,
8080 VOTECMD_FLAG,
81+ VOTECMD_NEXTMAP,
82+ VOTECMD_NEXTSECRET,
8183
8284 NUM_VOTECMDS
8385 };
@@ -159,6 +161,8 @@
159161 EXTERN_CVAR( Bool, sv_noduellimitvote );
160162 EXTERN_CVAR( Bool, sv_nopointlimitvote );
161163 EXTERN_CVAR( Bool, sv_noflagvote );
164+EXTERN_CVAR( Bool, sv_nonextmapvote );
165+EXTERN_CVAR( Bool, sv_nonextsecretvote );
162166 EXTERN_CVAR( Int, sv_votecooldown );
163167 EXTERN_CVAR( Int, sv_voteconnectwait );
164168 EXTERN_CVAR( Bool, cl_showfullscreenvote )
diff -r 7d7d643fa942 -r a040fb4c3bf1 src/menu/multiplayermenu.cpp
--- a/src/menu/multiplayermenu.cpp Sun Nov 07 11:40:10 2021 -0500
+++ b/src/menu/multiplayermenu.cpp Sun Nov 07 20:16:00 2021 +0000
@@ -128,6 +128,7 @@
128128 CVAR ( Int, menu_skirmishmodifier, 0, CVAR_ARCHIVE )
129129 CVAR ( Int, menu_callvotemap, 0, 0 )
130130 CVAR ( Bool, menu_callvoteintermission, true, 0 )
131+CVAR ( Bool, menu_callvotenextsecret, false, 0 )
131132 CVAR ( String, menu_callvotereason, "", 0 )
132133 CVAR ( String, menu_callvoteflag, "", 0 )
133134 CVAR ( Int, menu_callvotelimit, 0, 0 )
@@ -685,6 +686,24 @@
685686 }
686687 }
687688
689+// =================================================================================================
690+//
691+//
692+//
693+//
694+//
695+// =================================================================================================
696+
697+static void M_CallNextMapVote()
698+{
699+ FString command;
700+ command.Format("callvote %s \"%s\"",
701+ menu_callvotenextsecret ? "nextsecret" : "nextmap",
702+ *menu_callvotereason);
703+ C_DoCommand(command);
704+ M_ClearMenus();
705+}
706+
688707 //=================================================================================================
689708 //
690709 // [TP] M_ExecuteIgnore
@@ -921,6 +940,11 @@
921940 M_CallFlagVote();
922941 }
923942
943+CCMD ( menu_callnextmapvote )
944+{
945+ M_CallNextMapVote();
946+}
947+
924948 CCMD ( menu_autoselect )
925949 {
926950 M_AutoSelect();
diff -r 7d7d643fa942 -r a040fb4c3bf1 src/sv_main.cpp
--- a/src/sv_main.cpp Sun Nov 07 11:40:10 2021 -0500
+++ b/src/sv_main.cpp Sun Nov 07 20:16:00 2021 +0000
@@ -7147,6 +7147,16 @@
71477147 bVoteAllowed = !sv_noflagvote;
71487148 sprintf( szCommand, "flag" );
71497149 break;
7150+ case VOTECMD_NEXTMAP:
7151+
7152+ bVoteAllowed = !sv_nonextmapvote;
7153+ sprintf( szCommand, "nextmap" );
7154+ break;
7155+ case VOTECMD_NEXTSECRET:
7156+
7157+ bVoteAllowed = !sv_nonextsecretvote;
7158+ sprintf( szCommand, "nextsecret" );
7159+ break;
71507160 default:
71517161
71527162 return ( false );
diff -r 7d7d643fa942 -r a040fb4c3bf1 src/win32/serverconsole/resource.h
--- a/src/win32/serverconsole/resource.h Sun Nov 07 11:40:10 2021 -0500
+++ b/src/win32/serverconsole/resource.h Sun Nov 07 20:16:00 2021 +0000
@@ -232,6 +232,8 @@
232232 #define IDC_ALLOWRCON 4072
233233 #define IDC_LOGFILENAME_TIMESTAMP 4073
234234 #define IDC_VIEWLOGFILE 4082
235+#define IDC_ALLOWVOTE_NEXTMAP 4083
236+#define IDC_ALLOWVOTE_NEXTSECRET 4084
235237 #define ID_ADMIN_ADDREMOVEBOT 40000
236238 #define IDC_LMSWEAPONS_VALUE 40001
237239 #define IDR_JOIN_SERVER 40001
diff -r 7d7d643fa942 -r a040fb4c3bf1 src/win32/serverconsole/serverconsole.rc
--- a/src/win32/serverconsole/serverconsole.rc Sun Nov 07 11:40:10 2021 -0500
+++ b/src/win32/serverconsole/serverconsole.rc Sun Nov 07 20:16:00 2021 +0000
@@ -439,7 +439,7 @@
439439
440440
441441 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
442-IDD_SERVERSETTINGS_ACCESSTAB DIALOGEX 1, 13, 330, 164
442+IDD_SERVERSETTINGS_ACCESSTAB DIALOGEX 1, 13, 330, 184
443443 STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILDWINDOW
444444 FONT 8, "Tahoma", 400, 0, 1
445445 {
@@ -454,24 +454,26 @@
454454 EDITTEXT IDC_MAXPLAYERS, 34, 114, 32, 14, ES_AUTOHSCROLL | ES_NUMBER, WS_EX_LEFT
455455 CONTROL "", IDC_SPIN6, UPDOWN_CLASS, UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 54, 114, 12, 14, WS_EX_LEFT
456456 GROUPBOX "Passwords", IDC_STATIC, 15, 9, 136, 77, 0, WS_EX_LEFT
457- GROUPBOX "Voting", IDC_STATIC, 166, 9, 131, 132, 0, WS_EX_LEFT
457+ GROUPBOX "Voting", IDC_STATIC, 166, 9, 131, 152, 0, WS_EX_LEFT
458458 AUTOCHECKBOX "Allow users to call votes", IDC_ALLOW_CALLVOTE, 180, 23, 93, 10, 0, WS_EX_LEFT
459459 AUTOCHECKBOX "Allow kicks", IDC_ALLOWVOTE_KICKLIMIT, 194, 34, 50, 9, 0, WS_EX_LEFT
460460 AUTOCHECKBOX "Allow map votes", IDC_ALLOWVOTE_MAP, 194, 44, 77, 10, 0, WS_EX_LEFT
461461 AUTOCHECKBOX "Allow changemap votes", IDC_ALLOWVOTE_CHANGEMAP, 194, 54, 92, 10, 0, WS_EX_LEFT
462- AUTOCHECKBOX "Allow frag limit changes", IDC_ALLOWVOTE_FRAGLIMIT, 194, 64, 91, 10, 0, WS_EX_LEFT
463- AUTOCHECKBOX "Allow time limit changes", IDC_ALLOWVOTE_TIMELIMIT, 194, 74, 91, 10, 0, WS_EX_LEFT
464- AUTOCHECKBOX "Allow win limit changes", IDC_ALLOWVOTE_WINLIMIT, 194, 84, 89, 10, 0, WS_EX_LEFT
465- AUTOCHECKBOX "Allow duel limit changes", IDC_ALLOWVOTE_DUELLIMIT, 194, 94, 91, 10, 0, WS_EX_LEFT
466- AUTOCHECKBOX "Allow point limit changes", IDC_ALLOWVOTE_POINTLIMIT, 194, 104, 93, 10, 0, WS_EX_LEFT
467- AUTOCHECKBOX "Allow flag changes", IDC_ALLOWVOTE_FLAG, 194, 114, 90, 10, 0, WS_EX_LEFT
468- AUTOCHECKBOX "Allow spectators to vote", IDC_ALLOWVOTE_SPECTATOR, 194, 124, 94, 10, 0, WS_EX_LEFT
462+ AUTOCHECKBOX "Allow next map votes", IDC_ALLOWVOTE_NEXTMAP, 194, 64, 90, 10, 0, WS_EX_LEFT
463+ AUTOCHECKBOX "Allow secret map votes", IDC_ALLOWVOTE_NEXTSECRET, 194, 74, 90, 10, 0, WS_EX_LEFT
464+ AUTOCHECKBOX "Allow frag limit changes", IDC_ALLOWVOTE_FRAGLIMIT, 194, 84, 91, 10, 0, WS_EX_LEFT
465+ AUTOCHECKBOX "Allow time limit changes", IDC_ALLOWVOTE_TIMELIMIT, 194, 94, 91, 10, 0, WS_EX_LEFT
466+ AUTOCHECKBOX "Allow win limit changes", IDC_ALLOWVOTE_WINLIMIT, 194, 104, 89, 10, 0, WS_EX_LEFT
467+ AUTOCHECKBOX "Allow duel limit changes", IDC_ALLOWVOTE_DUELLIMIT, 194, 114, 91, 10, 0, WS_EX_LEFT
468+ AUTOCHECKBOX "Allow point limit changes", IDC_ALLOWVOTE_POINTLIMIT, 194, 124, 93, 10, 0, WS_EX_LEFT
469+ AUTOCHECKBOX "Allow flag changes", IDC_ALLOWVOTE_FLAG, 194, 134, 90, 10, 0, WS_EX_LEFT
470+ AUTOCHECKBOX "Allow spectators to vote", IDC_ALLOWVOTE_SPECTATOR, 194, 144, 94, 10, 0, WS_EX_LEFT
469471 }
470472
471473
472474
473475 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
474-IDD_SERVERSETTINGS_ADMINTAB DIALOGEX 1, 13, 330, 164
476+IDD_SERVERSETTINGS_ADMINTAB DIALOGEX 1, 13, 330, 184
475477 STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILDWINDOW
476478 FONT 8, "Tahoma", 400, 0, 1
477479 {
@@ -493,24 +495,24 @@
493495
494496
495497 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
496-IDD_SERVERSETTINGS_DIALOG DIALOGEX 0, 0, 343, 229
498+IDD_SERVERSETTINGS_DIALOG DIALOGEX 0, 0, 343, 249
497499 STYLE DS_CENTER | DS_MODALFRAME | DS_SETFONT | WS_CAPTION | WS_POPUP | WS_SYSMENU
498500 EXSTYLE WS_EX_APPWINDOW
499501 CAPTION "Configure server"
500502 FONT 8, "Tahoma", 400, 0, 0
501503 {
502504 ICON IDI_ICOSETTINGS, IDC_STATIC, 9, 9, 171, 158, SS_ICON, WS_EX_LEFT
503- CONTROL "", IDC_SETTINGSTAB, WC_TABCONTROL, WS_TABSTOP, 4, 39, 332, 164, WS_EX_LEFT
504- PUSHBUTTON "OK", IDOK, 174, 209, 50, 14, 0, WS_EX_LEFT
505- PUSHBUTTON "Cancel", IDCANCEL, 229, 209, 50, 14, 0, WS_EX_LEFT
506- PUSHBUTTON "&Help", IDNO, 284, 209, 50, 14, WS_DISABLED, WS_EX_LEFT
505+ CONTROL "", IDC_SETTINGSTAB, WC_TABCONTROL, WS_TABSTOP, 4, 39, 332, 184, WS_EX_LEFT
506+ PUSHBUTTON "OK", IDOK, 174, 229, 50, 14, 0, WS_EX_LEFT
507+ PUSHBUTTON "Cancel", IDCANCEL, 229, 229, 50, 14, 0, WS_EX_LEFT
508+ PUSHBUTTON "&Help", IDNO, 284, 229, 50, 14, WS_DISABLED, WS_EX_LEFT
507509 LTEXT "Configure server", IDC_TITLE, 40, 11, 172, 19, SS_LEFT, WS_EX_LEFT
508510 }
509511
510512
511513
512514 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
513-IDD_SERVERSETTINGS_GAMEPLAYTAB DIALOGEX 1, 13, 330, 164
515+IDD_SERVERSETTINGS_GAMEPLAYTAB DIALOGEX 1, 13, 330, 184
514516 STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILDWINDOW
515517 FONT 8, "Tahoma", 400, 0, 1
516518 {
@@ -548,7 +550,7 @@
548550
549551
550552 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
551-IDD_SERVERSETTINGS_SERVERTAB DIALOGEX 1, 13, 330, 164
553+IDD_SERVERSETTINGS_SERVERTAB DIALOGEX 1, 13, 330, 184
552554 STYLE DS_CONTROL | DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW
553555 FONT 8, "Tahoma", 400, 0, 1
554556 {
diff -r 7d7d643fa942 -r a040fb4c3bf1 src/win32/serverconsole/serverconsole_settings.cpp
--- a/src/win32/serverconsole/serverconsole_settings.cpp Sun Nov 07 11:40:10 2021 -0500
+++ b/src/win32/serverconsole/serverconsole_settings.cpp Sun Nov 07 20:16:00 2021 +0000
@@ -365,6 +365,8 @@
365365 sv_nomapvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_MAP, BM_GETCHECK, 0, 0 );
366366 sv_nochangemapvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_CHANGEMAP, BM_GETCHECK, 0, 0 );
367367 sv_noflagvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_FLAG, BM_GETCHECK, 0, 0 );
368+ sv_nonextmapvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_NEXTMAP, BM_GETCHECK, 0, 0 );
369+ sv_nonextsecretvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_NEXTSECRET, BM_GETCHECK, 0, 0 );
368370
369371 GetDlgItemText( hDlg, IDC_PASSWORD, szBuffer, 1024 );
370372 sv_password = szBuffer;
@@ -871,6 +873,8 @@
871873 EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_TIMELIMIT ), bVotesEnabled );
872874 EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_WINLIMIT ), bVotesEnabled );
873875 EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_FLAG ), bVotesEnabled );
876+ EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_NEXTMAP ), bVotesEnabled );
877+ EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_NEXTSECRET ), bVotesEnabled );
874878 EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_SPECTATOR ), bVotesEnabled );
875879 }
876880
@@ -925,6 +929,8 @@
925929 SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_MAP, BM_SETCHECK, ( !sv_nomapvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
926930 SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_CHANGEMAP, BM_SETCHECK, ( !sv_nochangemapvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
927931 SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_FLAG, BM_SETCHECK, ( !sv_noflagvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
932+ SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_NEXTMAP, BM_SETCHECK, ( !sv_nonextmapvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
933+ SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_NEXTSECRET, BM_SETCHECK, ( !sv_nonextsecretvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
928934 SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_SPECTATOR, BM_SETCHECK, ( sv_nocallvote != 2 ? BST_CHECKED : BST_UNCHECKED ), 0 );
929935
930936 settings_AccessTab_ShowOrHideItems( hDlg );
diff -r 7d7d643fa942 -r a040fb4c3bf1 wadsrc/static/menudef.za
--- a/wadsrc/static/menudef.za Sun Nov 07 11:40:10 2021 -0500
+++ b/wadsrc/static/menudef.za Sun Nov 07 20:16:00 2021 +0000
@@ -303,6 +303,7 @@
303303
304304 SubMenu "Kick a player", "ZA_CallKickVote"
305305 SubMenu "Change the map", "ZA_CallMapVote"
306+ SubMenu "Go to the next map", "ZA_CallNextMapVote"
306307 SubMenu "Change a limit", "ZA_CallLimitVote"
307308 SubMenu "Change a flag", "ZA_CallFlagVote"
308309 }
@@ -351,6 +352,19 @@
351352 Command "Vote!", "menu_callflagvote"
352353 }
353354
355+OptionMenu ZA_CallNextMapVote
356+{
357+ Title "GO TO NEXT MAP"
358+
359+ Option "Go to secret map", "menu_callvotenextsecret", "YesNo"
360+ StaticText " "
361+ StaticText "Note that if this map lacks a secret exit, then", 1
362+ StaticText "going to the secret map will just exit normally.", 1
363+ StaticText " "
364+ TextField "Reason for change", "menu_callvotereason"
365+ Command "Vote!", "menu_callnextmapvote"
366+}
367+
354368 // =================================================================================================
355369 //
356370 // IGNORE A PLAYER MENU
@@ -623,6 +637,8 @@
623637 Option "Force spectate votes", "sv_noforcespecvote", "NoYes"
624638 Option "Map votes", "sv_nomapvote", "NoYes"
625639 Option "Changemap votes", "sv_nochangemapvote", "NoYes"
640+ Option "Next map votes", "sv_nonextmapvote", "NoYes"
641+ Option "Secret map votes", "sv_nonextsecretvote", "NoYes"
626642 Option "Frag limit votes", "sv_nofraglimitvote", "NoYes"
627643 Option "Time limit votes", "sv_notimelimitvote", "NoYes"
628644 Option "Win limit votes", "sv_nowinlimitvote", "NoYes"
Show on old repository browser