| Anonymous | Login | Signup for a new account | 2025-11-11 21:30 UTC |
| My View | View Issues | Change Log | Roadmap | Zandronum Issue Support Ranking | Rules | My Account |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0002345 | Zandronum | [All Projects] Suggestion | public | 2015-07-12 15:12 | 2021-11-29 13:43 | ||||
| Reporter | Hypnotoad | ||||||||
| Assigned To | DrinkyBird | ||||||||
| Priority | normal | Severity | feature | Reproducibility | N/A | ||||
| Status | resolved | Resolution | fixed | ||||||
| Platform | Microsoft | OS | Windows | OS Version | XP/Vista/7 | ||||
| Product Version | |||||||||
| Target Version | 3.1 | Fixed in Version | 3.1 | ||||||
| Summary | 0002345: Callvote Nextmap | ||||||||
| Description | This would be enormously helpful for servers that have large maplists with sv_randommaprotation on. Often times the players want to skip a map, but don't want to go out of sequence of the randomly selected map-rotation (and are unaware what the next map in the sequence will be), or simply cannot agree which map to go to next meaning a vote to that map will not necessarily be successful even though they all definitely want to skip the map they are currently playing. | ||||||||
| Attached Files | # HG changeset patch
# User Sean Baggaley <sean@csnxs.uk>
# Date 1635891387 0
# Tue Nov 02 22:16:27 2021 +0000
# Node ID ffffffffffffffffffffffffffffffffffffffff
# Parent 366f5d10bc73521ba6d04d70cc411d898605d85b
diff -r 366f5d10bc73 src/callvote.cpp
--- a/src/callvote.cpp Sat Oct 30 13:16:29 2021 -0400
+++ b/src/callvote.cpp Tue Nov 02 22:16:27 2021 +0000
@@ -101,6 +101,7 @@
static bool callvote_CheckValidity( FString &Command, FString &Parameters );
static ULONG callvote_GetVoteType( const char *pszCommand );
static bool callvote_IsKickVote( const ULONG ulVoteType );
+static bool callvote_VoteHasParameters( const ULONG ulVoteType );
static bool callvote_IsFlagValid( const char *pszName );
//*****************************************************************************
@@ -352,8 +353,12 @@
// Create the vote console command.
g_VoteCommand = Command;
- g_VoteCommand += " ";
- g_VoteCommand += Parameters;
+ // [SB] Only include paramters if there actually are any
+ if ( Parameters.Len() > 0 )
+ {
+ g_VoteCommand += " ";
+ g_VoteCommand += Parameters;
+ }
g_ulVoteCaller = ulPlayer;
g_VoteReason = Reason.Left(25);
@@ -389,10 +394,19 @@
pLevel = FindLevelByName( g_VoteCommand.GetChars() + 4 );
else if ( strncmp( g_VoteCommand.GetChars(), "changemap", 9 ) == 0 )
pLevel = FindLevelByName( g_VoteCommand.GetChars() + 10 );
+ // [SB] And for the nextmap and nextsecret votes.
+ else if ( strncmp( g_VoteCommand.GetChars(), "nextmap", 7 ) == 0 )
+ pLevel = FindLevelByName( G_GetExitMap() );
+ else if ( strncmp ( g_VoteCommand.GetChars(), "nextsecret", 10 ) == 0 )
+ pLevel = FindLevelByName( G_GetSecretExitMap () );
// [AK] Add the full name of the level to the vote message if valid.
if ( pLevel != NULL )
- g_VoteMessage.AppendFormat( " - %s", pLevel->LookupLevelName().GetChars() );
+ // [SB] For nextmap and nextsecret votes, show the lump name too
+ if ( strncmp( g_VoteCommand.GetChars(), "nextmap", 7 ) == 0 || strncmp( g_VoteCommand.GetChars(), "nextsecret", 10 ) == 0 )
+ g_VoteMessage.AppendFormat( ": %s - %s", pLevel->mapname, pLevel->LookupLevelName().GetChars() );
+ else
+ g_VoteMessage.AppendFormat( " - %s", pLevel->LookupLevelName().GetChars() );
g_VoteState = VOTESTATE_INVOTE;
g_ulVoteCountdownTicks = VOTE_COUNTDOWN_TIME * TICRATE;
@@ -1073,6 +1087,19 @@
Parameters.Format( "%s", parameterInt ? "true" : "false" );
}
break;
+ case VOTECMD_NEXTMAP:
+ case VOTECMD_NEXTSECRET:
+ {
+ const char *next = ( ulVoteCmd == VOTECMD_NEXTSECRET ? G_GetSecretExitMap() : G_GetExitMap() );
+
+ if ( !next || !P_CheckIfMapExists( next ) )
+ {
+ SERVER_PrintfPlayer( SERVER_GetCurrentClient( ), "There is no next map, or it does not exist.\n" );
+ return ( false );
+ }
+ }
+ break;
+
default:
return ( false );
@@ -1104,6 +1131,10 @@
return VOTECMD_DUELLIMIT;
else if ( stricmp( "pointlimit", pszCommand ) == 0 )
return VOTECMD_POINTLIMIT;
+ else if ( stricmp( "nextmap", pszCommand ) == 0 )
+ return VOTECMD_NEXTMAP;
+ else if ( stricmp( "nextsecret", pszCommand ) == 0 )
+ return VOTECMD_NEXTSECRET;
else if ( callvote_IsFlagValid( pszCommand ))
return VOTECMD_FLAG;
@@ -1119,6 +1150,21 @@
//*****************************************************************************
//
+static bool callvote_VoteHasParameters( const ULONG ulVoteType )
+{
+ switch ( ulVoteType )
+ {
+ case VOTECMD_NEXTMAP:
+ case VOTECMD_NEXTSECRET:
+ return ( false );
+
+ default:
+ return ( true );
+ }
+}
+
+//*****************************************************************************
+//
static bool callvote_IsFlagValid( const char *pszName )
{
// [AK] Check to make sure the CVar the client sent by name actually exists.
@@ -1172,6 +1218,8 @@
CVAR( Bool, sv_noduellimitvote, false, CVAR_ARCHIVE | CVAR_SERVERINFO );
CVAR( Bool, sv_nopointlimitvote, false, CVAR_ARCHIVE | CVAR_SERVERINFO );
CVAR( Bool, sv_noflagvote, true, CVAR_ARCHIVE | CVAR_SERVERINFO );
+CVAR( Bool, sv_nonextmapvote, false, CVAR_ARCHIVE | CVAR_SERVERINFO );
+CVAR( Bool, sv_nonextsecretvote, false, CVAR_ARCHIVE | CVAR_SERVERINFO );
CVAR( Int, sv_votecooldown, 5, CVAR_ARCHIVE | CVAR_SERVERINFO );
CVAR( Int, sv_voteconnectwait, 0, CVAR_ARCHIVE | CVAR_SERVERINFO ); // [RK] The amount of seconds after client connect to wait before voting
CVAR( Bool, cl_showfullscreenvote, false, CVAR_ARCHIVE );
@@ -1182,6 +1230,9 @@
ULONG ulVoteCmd;
char szArgument[128];
+ // [SB] Prevent the arguments buffer from being full of garbage when the vote has no parameters
+ szArgument[0] = '\0';
+
// Don't allow a vote unless the player is a client.
if ( NETWORK_GetState( ) != NETSTATE_CLIENT )
{
@@ -1192,9 +1243,9 @@
if ( CLIENT_GetConnectionState( ) != CTS_ACTIVE )
return;
- if ( argv.argc( ) < 3 )
+ if ( argv.argc( ) < 2 )
{
- Printf( "callvote <command> <parameters> [reason]: Calls a vote\n" );
+ Printf( "callvote <command> [parameters] [reason]: Calls a vote\n" );
return;
}
@@ -1212,14 +1263,23 @@
return;
}
+ bool hasParameters = callvote_VoteHasParameters( ulVoteCmd );
+
+ if ( hasParameters && argv.argc( ) < 3 )
+ {
+ Printf( "That vote type requires a parameter.\n" );
+ return;
+ }
+
// [AK] If we're calling a flag vote, put the CVar's name and the parameter together.
if ( ulVoteCmd == VOTECMD_FLAG )
sprintf( szArgument, "%s %s", argv[1], argv[2] );
- else
+ else if ( hasParameters )
sprintf( szArgument, "%s", argv[2] );
- if ( argv.argc( ) >= 4 )
- CLIENTCOMMANDS_CallVote( ulVoteCmd, szArgument, argv[3] );
+ int reasonOffset = hasParameters ? 1 : 0;
+ if ( argv.argc( ) >= 3 + reasonOffset )
+ CLIENTCOMMANDS_CallVote( ulVoteCmd, szArgument, argv[2 + reasonOffset] );
else
CLIENTCOMMANDS_CallVote( ulVoteCmd, szArgument, "" );
/*
diff -r 366f5d10bc73 src/callvote.h
--- a/src/callvote.h Sat Oct 30 13:16:29 2021 -0400
+++ b/src/callvote.h Tue Nov 02 22:16:27 2021 +0000
@@ -78,6 +78,8 @@
VOTECMD_DUELLIMIT,
VOTECMD_POINTLIMIT,
VOTECMD_FLAG,
+ VOTECMD_NEXTMAP,
+ VOTECMD_NEXTSECRET,
NUM_VOTECMDS
};
@@ -159,6 +161,8 @@
EXTERN_CVAR( Bool, sv_noduellimitvote );
EXTERN_CVAR( Bool, sv_nopointlimitvote );
EXTERN_CVAR( Bool, sv_noflagvote );
+EXTERN_CVAR( Bool, sv_nonextmapvote );
+EXTERN_CVAR( Bool, sv_nonextsecretvote );
EXTERN_CVAR( Int, sv_votecooldown );
EXTERN_CVAR( Int, sv_voteconnectwait );
EXTERN_CVAR( Bool, cl_showfullscreenvote )
diff -r 366f5d10bc73 src/menu/multiplayermenu.cpp
--- a/src/menu/multiplayermenu.cpp Sat Oct 30 13:16:29 2021 -0400
+++ b/src/menu/multiplayermenu.cpp Tue Nov 02 22:16:27 2021 +0000
@@ -128,6 +128,7 @@
CVAR ( Int, menu_skirmishmodifier, 0, CVAR_ARCHIVE )
CVAR ( Int, menu_callvotemap, 0, 0 )
CVAR ( Bool, menu_callvoteintermission, true, 0 )
+CVAR ( Bool, menu_callvotenextsecret, false, 0 )
CVAR ( String, menu_callvotereason, "", 0 )
CVAR ( String, menu_callvoteflag, "", 0 )
CVAR ( Int, menu_callvotelimit, 0, 0 )
@@ -685,6 +686,24 @@
}
}
+// =================================================================================================
+//
+//
+//
+//
+//
+// =================================================================================================
+
+static void M_CallNextMapVote()
+{
+ FString command;
+ command.Format("callvote %s \"%s\"",
+ menu_callvotenextsecret ? "nextsecret" : "nextmap",
+ *menu_callvotereason);
+ C_DoCommand(command);
+ M_ClearMenus();
+}
+
//=================================================================================================
//
// [TP] M_ExecuteIgnore
@@ -921,6 +940,11 @@
M_CallFlagVote();
}
+CCMD ( menu_callnextmapvote )
+{
+ M_CallNextMapVote();
+}
+
CCMD ( menu_autoselect )
{
M_AutoSelect();
diff -r 366f5d10bc73 src/sv_main.cpp
--- a/src/sv_main.cpp Sat Oct 30 13:16:29 2021 -0400
+++ b/src/sv_main.cpp Tue Nov 02 22:16:27 2021 +0000
@@ -7099,6 +7099,16 @@
bVoteAllowed = !sv_noflagvote;
sprintf( szCommand, "flag" );
break;
+ case VOTECMD_NEXTMAP:
+
+ bVoteAllowed = !sv_nonextmapvote;
+ sprintf( szCommand, "nextmap" );
+ break;
+ case VOTECMD_NEXTSECRET:
+
+ bVoteAllowed = !sv_nonextsecretvote;
+ sprintf( szCommand, "nextsecret" );
+ break;
default:
return ( false );
diff -r 366f5d10bc73 src/win32/serverconsole/resource.h
--- a/src/win32/serverconsole/resource.h Sat Oct 30 13:16:29 2021 -0400
+++ b/src/win32/serverconsole/resource.h Tue Nov 02 22:16:27 2021 +0000
@@ -232,6 +232,8 @@
#define IDC_ALLOWRCON 4072
#define IDC_LOGFILENAME_TIMESTAMP 4073
#define IDC_VIEWLOGFILE 4082
+#define IDC_ALLOWVOTE_NEXTMAP 4083
+#define IDC_ALLOWVOTE_NEXTSECRET 4084
#define ID_ADMIN_ADDREMOVEBOT 40000
#define IDC_LMSWEAPONS_VALUE 40001
#define IDR_JOIN_SERVER 40001
diff -r 366f5d10bc73 src/win32/serverconsole/serverconsole.rc
--- a/src/win32/serverconsole/serverconsole.rc Sat Oct 30 13:16:29 2021 -0400
+++ b/src/win32/serverconsole/serverconsole.rc Tue Nov 02 22:16:27 2021 +0000
@@ -439,7 +439,7 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_SERVERSETTINGS_ACCESSTAB DIALOGEX 1, 13, 330, 164
+IDD_SERVERSETTINGS_ACCESSTAB DIALOGEX 1, 13, 330, 184
STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILDWINDOW
FONT 8, "Tahoma", 400, 0, 1
{
@@ -454,7 +454,7 @@
EDITTEXT IDC_MAXPLAYERS, 34, 114, 32, 14, ES_AUTOHSCROLL | ES_NUMBER, WS_EX_LEFT
CONTROL "", IDC_SPIN6, UPDOWN_CLASS, UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 54, 114, 12, 14, WS_EX_LEFT
GROUPBOX "Passwords", IDC_STATIC, 15, 9, 136, 77, 0, WS_EX_LEFT
- GROUPBOX "Voting", IDC_STATIC, 166, 9, 131, 132, 0, WS_EX_LEFT
+ GROUPBOX "Voting", IDC_STATIC, 166, 9, 131, 152, 0, WS_EX_LEFT
AUTOCHECKBOX "Allow users to call votes", IDC_ALLOW_CALLVOTE, 180, 23, 93, 10, 0, WS_EX_LEFT
AUTOCHECKBOX "Allow kicks", IDC_ALLOWVOTE_KICKLIMIT, 194, 34, 50, 9, 0, WS_EX_LEFT
AUTOCHECKBOX "Allow map votes", IDC_ALLOWVOTE_MAP, 194, 44, 77, 10, 0, WS_EX_LEFT
@@ -464,14 +464,16 @@
AUTOCHECKBOX "Allow win limit changes", IDC_ALLOWVOTE_WINLIMIT, 194, 84, 89, 10, 0, WS_EX_LEFT
AUTOCHECKBOX "Allow duel limit changes", IDC_ALLOWVOTE_DUELLIMIT, 194, 94, 91, 10, 0, WS_EX_LEFT
AUTOCHECKBOX "Allow point limit changes", IDC_ALLOWVOTE_POINTLIMIT, 194, 104, 93, 10, 0, WS_EX_LEFT
- AUTOCHECKBOX "Allow flag changes", IDC_ALLOWVOTE_FLAG, 194, 114, 90, 10, 0, WS_EX_LEFT
- AUTOCHECKBOX "Allow spectators to vote", IDC_ALLOWVOTE_SPECTATOR, 194, 124, 94, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow flag changes", IDC_ALLOWVOTE_FLAG, 194, 114, 90, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow next map votes", IDC_ALLOWVOTE_NEXTMAP, 194, 124, 90, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow secret map votes", IDC_ALLOWVOTE_NEXTSECRET, 194, 134, 90, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow spectators to vote", IDC_ALLOWVOTE_SPECTATOR, 194, 144, 94, 10, 0, WS_EX_LEFT
}
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_SERVERSETTINGS_ADMINTAB DIALOGEX 1, 13, 330, 164
+IDD_SERVERSETTINGS_ADMINTAB DIALOGEX 1, 13, 330, 184
STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILDWINDOW
FONT 8, "Tahoma", 400, 0, 1
{
@@ -493,24 +495,24 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_SERVERSETTINGS_DIALOG DIALOGEX 0, 0, 343, 229
+IDD_SERVERSETTINGS_DIALOG DIALOGEX 0, 0, 343, 249
STYLE DS_CENTER | DS_MODALFRAME | DS_SETFONT | WS_CAPTION | WS_POPUP | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Configure server"
FONT 8, "Tahoma", 400, 0, 0
{
ICON IDI_ICOSETTINGS, IDC_STATIC, 9, 9, 171, 158, SS_ICON, WS_EX_LEFT
- CONTROL "", IDC_SETTINGSTAB, WC_TABCONTROL, WS_TABSTOP, 4, 39, 332, 164, WS_EX_LEFT
- PUSHBUTTON "OK", IDOK, 174, 209, 50, 14, 0, WS_EX_LEFT
- PUSHBUTTON "Cancel", IDCANCEL, 229, 209, 50, 14, 0, WS_EX_LEFT
- PUSHBUTTON "&Help", IDNO, 284, 209, 50, 14, WS_DISABLED, WS_EX_LEFT
+ CONTROL "", IDC_SETTINGSTAB, WC_TABCONTROL, WS_TABSTOP, 4, 39, 332, 184, WS_EX_LEFT
+ PUSHBUTTON "OK", IDOK, 174, 229, 50, 14, 0, WS_EX_LEFT
+ PUSHBUTTON "Cancel", IDCANCEL, 229, 229, 50, 14, 0, WS_EX_LEFT
+ PUSHBUTTON "&Help", IDNO, 284, 229, 50, 14, WS_DISABLED, WS_EX_LEFT
LTEXT "Configure server", IDC_TITLE, 40, 11, 172, 19, SS_LEFT, WS_EX_LEFT
}
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_SERVERSETTINGS_GAMEPLAYTAB DIALOGEX 1, 13, 330, 164
+IDD_SERVERSETTINGS_GAMEPLAYTAB DIALOGEX 1, 13, 330, 184
STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILDWINDOW
FONT 8, "Tahoma", 400, 0, 1
{
@@ -548,7 +550,7 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_SERVERSETTINGS_SERVERTAB DIALOGEX 1, 13, 330, 164
+IDD_SERVERSETTINGS_SERVERTAB DIALOGEX 1, 13, 330, 184
STYLE DS_CONTROL | DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW
FONT 8, "Tahoma", 400, 0, 1
{
diff -r 366f5d10bc73 src/win32/serverconsole/serverconsole_settings.cpp
--- a/src/win32/serverconsole/serverconsole_settings.cpp Sat Oct 30 13:16:29 2021 -0400
+++ b/src/win32/serverconsole/serverconsole_settings.cpp Tue Nov 02 22:16:27 2021 +0000
@@ -365,6 +365,8 @@
sv_nomapvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_MAP, BM_GETCHECK, 0, 0 );
sv_nochangemapvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_CHANGEMAP, BM_GETCHECK, 0, 0 );
sv_noflagvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_FLAG, BM_GETCHECK, 0, 0 );
+ sv_nonextmapvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_NEXTMAP, BM_GETCHECK, 0, 0 );
+ sv_nonextsecretvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_NEXTSECRET, BM_GETCHECK, 0, 0 );
GetDlgItemText( hDlg, IDC_PASSWORD, szBuffer, 1024 );
sv_password = szBuffer;
@@ -871,6 +873,8 @@
EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_TIMELIMIT ), bVotesEnabled );
EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_WINLIMIT ), bVotesEnabled );
EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_FLAG ), bVotesEnabled );
+ EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_NEXTMAP ), bVotesEnabled );
+ EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_NEXTSECRET ), bVotesEnabled );
EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_SPECTATOR ), bVotesEnabled );
}
@@ -925,6 +929,8 @@
SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_MAP, BM_SETCHECK, ( !sv_nomapvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_CHANGEMAP, BM_SETCHECK, ( !sv_nochangemapvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_FLAG, BM_SETCHECK, ( !sv_noflagvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
+ SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_NEXTMAP, BM_SETCHECK, ( !sv_nonextmapvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
+ SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_NEXTSECRET, BM_SETCHECK, ( !sv_nonextsecretvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_SPECTATOR, BM_SETCHECK, ( sv_nocallvote != 2 ? BST_CHECKED : BST_UNCHECKED ), 0 );
settings_AccessTab_ShowOrHideItems( hDlg );
diff -r 366f5d10bc73 wadsrc/static/menudef.za
--- a/wadsrc/static/menudef.za Sat Oct 30 13:16:29 2021 -0400
+++ b/wadsrc/static/menudef.za Tue Nov 02 22:16:27 2021 +0000
@@ -305,6 +305,7 @@
SubMenu "Change the map", "ZA_CallMapVote"
SubMenu "Change a limit", "ZA_CallLimitVote"
SubMenu "Change a flag", "ZA_CallFlagVote"
+ SubMenu "Go to the next map", "ZA_CallNextMapVote"
}
OptionMenu ZA_CallKickVote
@@ -351,6 +352,19 @@
Command "Vote!", "menu_callflagvote"
}
+OptionMenu ZA_CallNextMapVote
+{
+ Title "GO TO NEXT MAP"
+
+ Option "Go to secret map", "menu_callvotenextsecret", "YesNo"
+ StaticText " "
+ StaticText "Note that if this map lacks a secret exit, then", 1
+ StaticText "going to the secret map will just exit normally.", 1
+ StaticText " "
+ TextField "Reason for change", "menu_callvotereason"
+ Command "Vote!", "menu_callnextmapvote"
+}
+
// =================================================================================================
//
// IGNORE A PLAYER MENU
@@ -621,6 +635,8 @@
Option "Duel limit votes", "sv_noduellimitvote", "NoYes"
Option "Point limit votes", "sv_nopointlimitvote", "NoYes"
Option "Flag votes", "sv_noflagvote", "NoYes"
+ Option "Next map votes", "sv_nonextmapvote", "NoYes"
+ Option "Secret map votes", "sv_nonextsecretvote", "NoYes"
Class VotingSetupMenu
}
# HG changeset patch
# User Sean Baggaley <sean@csnxs.uk>
# Date 1635902957 0
# Wed Nov 03 01:29:17 2021 +0000
# Node ID ffffffffffffffffffffffffffffffffffffffff
# Parent 366f5d10bc73521ba6d04d70cc411d898605d85b
diff -r 366f5d10bc73 docs/zandronum-history.txt
--- a/docs/zandronum-history.txt Sat Oct 30 13:16:29 2021 -0400
+++ b/docs/zandronum-history.txt Wed Nov 03 01:29:17 2021 +0000
@@ -61,6 +61,7 @@
+ - Added DMFlags: "sv_shootthroughallies" and "sv_dontpushallies", so a player's attacks can pass through and not push their allies. [Kaminsky]
+ - Added packet loss mitigation, which the client can control using the CVar "cl_backupcommands". [Kaminsky]
+ - Added the server CVAR "sv_country", which allows servers to present their country to launchers. [Sean]
++ - Added the new nextmap and nextsecret vote types. [Sean]
- - Fixed: Bots tries to jump to reach item when sv_nojump is true. [sleep]
- - Fixed: ACS function SetSkyScrollSpeed didn't work online. [Edward-san]
- - Fixed: color codes in callvote reasons weren't terminated properly. [Dusk]
diff -r 366f5d10bc73 src/callvote.cpp
--- a/src/callvote.cpp Sat Oct 30 13:16:29 2021 -0400
+++ b/src/callvote.cpp Wed Nov 03 01:29:17 2021 +0000
@@ -101,6 +101,7 @@
static bool callvote_CheckValidity( FString &Command, FString &Parameters );
static ULONG callvote_GetVoteType( const char *pszCommand );
static bool callvote_IsKickVote( const ULONG ulVoteType );
+static bool callvote_VoteHasParameters( const ULONG ulVoteType );
static bool callvote_IsFlagValid( const char *pszName );
//*****************************************************************************
@@ -352,8 +353,13 @@
// Create the vote console command.
g_VoteCommand = Command;
- g_VoteCommand += " ";
- g_VoteCommand += Parameters;
+ // [SB] Only include parameters if there actually are any
+ if ( Parameters.Len() > 0 )
+ {
+ g_VoteCommand += " ";
+ g_VoteCommand += Parameters;
+ }
+
g_ulVoteCaller = ulPlayer;
g_VoteReason = Reason.Left(25);
@@ -1073,6 +1079,20 @@
Parameters.Format( "%s", parameterInt ? "true" : "false" );
}
break;
+ case VOTECMD_NEXTMAP:
+ case VOTECMD_NEXTSECRET:
+ {
+ const char *next = ( ulVoteCmd == VOTECMD_NEXTSECRET ? G_GetSecretExitMap() : G_GetExitMap() );
+ Printf("DBG next: %s\n", next);
+
+ if ( !next || !P_CheckIfMapExists( next ) )
+ {
+ SERVER_PrintfPlayer( SERVER_GetCurrentClient( ), "There is no next map, or it does not exist.\n" );
+ return ( false );
+ }
+ }
+ break;
+
default:
return ( false );
@@ -1104,6 +1124,10 @@
return VOTECMD_DUELLIMIT;
else if ( stricmp( "pointlimit", pszCommand ) == 0 )
return VOTECMD_POINTLIMIT;
+ else if ( stricmp( "nextmap", pszCommand ) == 0 )
+ return VOTECMD_NEXTMAP;
+ else if ( stricmp( "nextsecret", pszCommand ) == 0 )
+ return VOTECMD_NEXTSECRET;
else if ( callvote_IsFlagValid( pszCommand ))
return VOTECMD_FLAG;
@@ -1119,6 +1143,21 @@
//*****************************************************************************
//
+static bool callvote_VoteHasParameters( const ULONG ulVoteType )
+{
+ switch ( ulVoteType )
+ {
+ case VOTECMD_NEXTMAP:
+ case VOTECMD_NEXTSECRET:
+ return ( false );
+
+ default:
+ return ( true );
+ }
+}
+
+//*****************************************************************************
+//
static bool callvote_IsFlagValid( const char *pszName )
{
// [AK] Check to make sure the CVar the client sent by name actually exists.
@@ -1172,6 +1211,8 @@
CVAR( Bool, sv_noduellimitvote, false, CVAR_ARCHIVE | CVAR_SERVERINFO );
CVAR( Bool, sv_nopointlimitvote, false, CVAR_ARCHIVE | CVAR_SERVERINFO );
CVAR( Bool, sv_noflagvote, true, CVAR_ARCHIVE | CVAR_SERVERINFO );
+CVAR( Bool, sv_nonextmapvote, false, CVAR_ARCHIVE | CVAR_SERVERINFO );
+CVAR( Bool, sv_nonextsecretvote, false, CVAR_ARCHIVE | CVAR_SERVERINFO );
CVAR( Int, sv_votecooldown, 5, CVAR_ARCHIVE | CVAR_SERVERINFO );
CVAR( Int, sv_voteconnectwait, 0, CVAR_ARCHIVE | CVAR_SERVERINFO ); // [RK] The amount of seconds after client connect to wait before voting
CVAR( Bool, cl_showfullscreenvote, false, CVAR_ARCHIVE );
@@ -1182,6 +1223,9 @@
ULONG ulVoteCmd;
char szArgument[128];
+ // [SB] Prevent the arguments buffer from being full of garbage when the vote has no parameters
+ szArgument[0] = '\0';
+
// Don't allow a vote unless the player is a client.
if ( NETWORK_GetState( ) != NETSTATE_CLIENT )
{
@@ -1192,9 +1236,9 @@
if ( CLIENT_GetConnectionState( ) != CTS_ACTIVE )
return;
- if ( argv.argc( ) < 3 )
+ if ( argv.argc( ) < 2 )
{
- Printf( "callvote <command> <parameters> [reason]: Calls a vote\n" );
+ Printf( "callvote <command> [parameters] [reason]: Calls a vote\n" );
return;
}
@@ -1212,14 +1256,23 @@
return;
}
+ bool hasParameters = callvote_VoteHasParameters( ulVoteCmd );
+
+ if ( hasParameters && argv.argc( ) < 3 )
+ {
+ Printf( "That vote type requires a parameter.\n" );
+ return;
+ }
+
// [AK] If we're calling a flag vote, put the CVar's name and the parameter together.
if ( ulVoteCmd == VOTECMD_FLAG )
sprintf( szArgument, "%s %s", argv[1], argv[2] );
- else
+ else if ( hasParameters )
sprintf( szArgument, "%s", argv[2] );
- if ( argv.argc( ) >= 4 )
- CLIENTCOMMANDS_CallVote( ulVoteCmd, szArgument, argv[3] );
+ int reasonOffset = hasParameters ? 1 : 0;
+ if ( argv.argc( ) >= 3 + reasonOffset )
+ CLIENTCOMMANDS_CallVote( ulVoteCmd, szArgument, argv[2 + reasonOffset] );
else
CLIENTCOMMANDS_CallVote( ulVoteCmd, szArgument, "" );
/*
diff -r 366f5d10bc73 src/callvote.h
--- a/src/callvote.h Sat Oct 30 13:16:29 2021 -0400
+++ b/src/callvote.h Wed Nov 03 01:29:17 2021 +0000
@@ -78,6 +78,8 @@
VOTECMD_DUELLIMIT,
VOTECMD_POINTLIMIT,
VOTECMD_FLAG,
+ VOTECMD_NEXTMAP,
+ VOTECMD_NEXTSECRET,
NUM_VOTECMDS
};
@@ -159,6 +161,8 @@
EXTERN_CVAR( Bool, sv_noduellimitvote );
EXTERN_CVAR( Bool, sv_nopointlimitvote );
EXTERN_CVAR( Bool, sv_noflagvote );
+EXTERN_CVAR( Bool, sv_nonextmapvote );
+EXTERN_CVAR( Bool, sv_nonextsecretvote );
EXTERN_CVAR( Int, sv_votecooldown );
EXTERN_CVAR( Int, sv_voteconnectwait );
EXTERN_CVAR( Bool, cl_showfullscreenvote )
diff -r 366f5d10bc73 src/menu/multiplayermenu.cpp
--- a/src/menu/multiplayermenu.cpp Sat Oct 30 13:16:29 2021 -0400
+++ b/src/menu/multiplayermenu.cpp Wed Nov 03 01:29:17 2021 +0000
@@ -128,6 +128,7 @@
CVAR ( Int, menu_skirmishmodifier, 0, CVAR_ARCHIVE )
CVAR ( Int, menu_callvotemap, 0, 0 )
CVAR ( Bool, menu_callvoteintermission, true, 0 )
+CVAR ( Bool, menu_callvotenextsecret, false, 0 )
CVAR ( String, menu_callvotereason, "", 0 )
CVAR ( String, menu_callvoteflag, "", 0 )
CVAR ( Int, menu_callvotelimit, 0, 0 )
@@ -685,6 +686,24 @@
}
}
+// =================================================================================================
+//
+//
+//
+//
+//
+// =================================================================================================
+
+static void M_CallNextMapVote()
+{
+ FString command;
+ command.Format("callvote %s \"%s\"",
+ menu_callvotenextsecret ? "nextsecret" : "nextmap",
+ *menu_callvotereason);
+ C_DoCommand(command);
+ M_ClearMenus();
+}
+
//=================================================================================================
//
// [TP] M_ExecuteIgnore
@@ -921,6 +940,11 @@
M_CallFlagVote();
}
+CCMD ( menu_callnextmapvote )
+{
+ M_CallNextMapVote();
+}
+
CCMD ( menu_autoselect )
{
M_AutoSelect();
diff -r 366f5d10bc73 src/sv_main.cpp
--- a/src/sv_main.cpp Sat Oct 30 13:16:29 2021 -0400
+++ b/src/sv_main.cpp Wed Nov 03 01:29:17 2021 +0000
@@ -7099,6 +7099,16 @@
bVoteAllowed = !sv_noflagvote;
sprintf( szCommand, "flag" );
break;
+ case VOTECMD_NEXTMAP:
+
+ bVoteAllowed = !sv_nonextmapvote;
+ sprintf( szCommand, "nextmap" );
+ break;
+ case VOTECMD_NEXTSECRET:
+
+ bVoteAllowed = !sv_nonextsecretvote;
+ sprintf( szCommand, "nextsecret" );
+ break;
default:
return ( false );
diff -r 366f5d10bc73 src/win32/serverconsole/resource.h
--- a/src/win32/serverconsole/resource.h Sat Oct 30 13:16:29 2021 -0400
+++ b/src/win32/serverconsole/resource.h Wed Nov 03 01:29:17 2021 +0000
@@ -232,6 +232,8 @@
#define IDC_ALLOWRCON 4072
#define IDC_LOGFILENAME_TIMESTAMP 4073
#define IDC_VIEWLOGFILE 4082
+#define IDC_ALLOWVOTE_NEXTMAP 4083
+#define IDC_ALLOWVOTE_NEXTSECRET 4084
#define ID_ADMIN_ADDREMOVEBOT 40000
#define IDC_LMSWEAPONS_VALUE 40001
#define IDR_JOIN_SERVER 40001
diff -r 366f5d10bc73 src/win32/serverconsole/serverconsole.rc
--- a/src/win32/serverconsole/serverconsole.rc Sat Oct 30 13:16:29 2021 -0400
+++ b/src/win32/serverconsole/serverconsole.rc Wed Nov 03 01:29:17 2021 +0000
@@ -439,7 +439,7 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_SERVERSETTINGS_ACCESSTAB DIALOGEX 1, 13, 330, 164
+IDD_SERVERSETTINGS_ACCESSTAB DIALOGEX 1, 13, 330, 184
STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILDWINDOW
FONT 8, "Tahoma", 400, 0, 1
{
@@ -454,24 +454,26 @@
EDITTEXT IDC_MAXPLAYERS, 34, 114, 32, 14, ES_AUTOHSCROLL | ES_NUMBER, WS_EX_LEFT
CONTROL "", IDC_SPIN6, UPDOWN_CLASS, UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 54, 114, 12, 14, WS_EX_LEFT
GROUPBOX "Passwords", IDC_STATIC, 15, 9, 136, 77, 0, WS_EX_LEFT
- GROUPBOX "Voting", IDC_STATIC, 166, 9, 131, 132, 0, WS_EX_LEFT
+ GROUPBOX "Voting", IDC_STATIC, 166, 9, 131, 152, 0, WS_EX_LEFT
AUTOCHECKBOX "Allow users to call votes", IDC_ALLOW_CALLVOTE, 180, 23, 93, 10, 0, WS_EX_LEFT
AUTOCHECKBOX "Allow kicks", IDC_ALLOWVOTE_KICKLIMIT, 194, 34, 50, 9, 0, WS_EX_LEFT
AUTOCHECKBOX "Allow map votes", IDC_ALLOWVOTE_MAP, 194, 44, 77, 10, 0, WS_EX_LEFT
AUTOCHECKBOX "Allow changemap votes", IDC_ALLOWVOTE_CHANGEMAP, 194, 54, 92, 10, 0, WS_EX_LEFT
- AUTOCHECKBOX "Allow frag limit changes", IDC_ALLOWVOTE_FRAGLIMIT, 194, 64, 91, 10, 0, WS_EX_LEFT
- AUTOCHECKBOX "Allow time limit changes", IDC_ALLOWVOTE_TIMELIMIT, 194, 74, 91, 10, 0, WS_EX_LEFT
- AUTOCHECKBOX "Allow win limit changes", IDC_ALLOWVOTE_WINLIMIT, 194, 84, 89, 10, 0, WS_EX_LEFT
- AUTOCHECKBOX "Allow duel limit changes", IDC_ALLOWVOTE_DUELLIMIT, 194, 94, 91, 10, 0, WS_EX_LEFT
- AUTOCHECKBOX "Allow point limit changes", IDC_ALLOWVOTE_POINTLIMIT, 194, 104, 93, 10, 0, WS_EX_LEFT
- AUTOCHECKBOX "Allow flag changes", IDC_ALLOWVOTE_FLAG, 194, 114, 90, 10, 0, WS_EX_LEFT
- AUTOCHECKBOX "Allow spectators to vote", IDC_ALLOWVOTE_SPECTATOR, 194, 124, 94, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow next map votes", IDC_ALLOWVOTE_NEXTMAP, 194, 64, 90, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow secret map votes", IDC_ALLOWVOTE_NEXTSECRET, 194, 74, 90, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow frag limit changes", IDC_ALLOWVOTE_FRAGLIMIT, 194, 84, 91, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow time limit changes", IDC_ALLOWVOTE_TIMELIMIT, 194, 94, 91, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow win limit changes", IDC_ALLOWVOTE_WINLIMIT, 194, 104, 89, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow duel limit changes", IDC_ALLOWVOTE_DUELLIMIT, 194, 114, 91, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow point limit changes", IDC_ALLOWVOTE_POINTLIMIT, 194, 124, 93, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow flag changes", IDC_ALLOWVOTE_FLAG, 194, 134, 90, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow spectators to vote", IDC_ALLOWVOTE_SPECTATOR, 194, 144, 94, 10, 0, WS_EX_LEFT
}
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_SERVERSETTINGS_ADMINTAB DIALOGEX 1, 13, 330, 164
+IDD_SERVERSETTINGS_ADMINTAB DIALOGEX 1, 13, 330, 184
STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILDWINDOW
FONT 8, "Tahoma", 400, 0, 1
{
@@ -493,24 +495,24 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_SERVERSETTINGS_DIALOG DIALOGEX 0, 0, 343, 229
+IDD_SERVERSETTINGS_DIALOG DIALOGEX 0, 0, 343, 249
STYLE DS_CENTER | DS_MODALFRAME | DS_SETFONT | WS_CAPTION | WS_POPUP | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Configure server"
FONT 8, "Tahoma", 400, 0, 0
{
ICON IDI_ICOSETTINGS, IDC_STATIC, 9, 9, 171, 158, SS_ICON, WS_EX_LEFT
- CONTROL "", IDC_SETTINGSTAB, WC_TABCONTROL, WS_TABSTOP, 4, 39, 332, 164, WS_EX_LEFT
- PUSHBUTTON "OK", IDOK, 174, 209, 50, 14, 0, WS_EX_LEFT
- PUSHBUTTON "Cancel", IDCANCEL, 229, 209, 50, 14, 0, WS_EX_LEFT
- PUSHBUTTON "&Help", IDNO, 284, 209, 50, 14, WS_DISABLED, WS_EX_LEFT
+ CONTROL "", IDC_SETTINGSTAB, WC_TABCONTROL, WS_TABSTOP, 4, 39, 332, 184, WS_EX_LEFT
+ PUSHBUTTON "OK", IDOK, 174, 229, 50, 14, 0, WS_EX_LEFT
+ PUSHBUTTON "Cancel", IDCANCEL, 229, 229, 50, 14, 0, WS_EX_LEFT
+ PUSHBUTTON "&Help", IDNO, 284, 229, 50, 14, WS_DISABLED, WS_EX_LEFT
LTEXT "Configure server", IDC_TITLE, 40, 11, 172, 19, SS_LEFT, WS_EX_LEFT
}
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_SERVERSETTINGS_GAMEPLAYTAB DIALOGEX 1, 13, 330, 164
+IDD_SERVERSETTINGS_GAMEPLAYTAB DIALOGEX 1, 13, 330, 184
STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILDWINDOW
FONT 8, "Tahoma", 400, 0, 1
{
@@ -548,7 +550,7 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_SERVERSETTINGS_SERVERTAB DIALOGEX 1, 13, 330, 164
+IDD_SERVERSETTINGS_SERVERTAB DIALOGEX 1, 13, 330, 184
STYLE DS_CONTROL | DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW
FONT 8, "Tahoma", 400, 0, 1
{
diff -r 366f5d10bc73 src/win32/serverconsole/serverconsole_settings.cpp
--- a/src/win32/serverconsole/serverconsole_settings.cpp Sat Oct 30 13:16:29 2021 -0400
+++ b/src/win32/serverconsole/serverconsole_settings.cpp Wed Nov 03 01:29:17 2021 +0000
@@ -365,6 +365,8 @@
sv_nomapvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_MAP, BM_GETCHECK, 0, 0 );
sv_nochangemapvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_CHANGEMAP, BM_GETCHECK, 0, 0 );
sv_noflagvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_FLAG, BM_GETCHECK, 0, 0 );
+ sv_nonextmapvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_NEXTMAP, BM_GETCHECK, 0, 0 );
+ sv_nonextsecretvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_NEXTSECRET, BM_GETCHECK, 0, 0 );
GetDlgItemText( hDlg, IDC_PASSWORD, szBuffer, 1024 );
sv_password = szBuffer;
@@ -871,6 +873,8 @@
EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_TIMELIMIT ), bVotesEnabled );
EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_WINLIMIT ), bVotesEnabled );
EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_FLAG ), bVotesEnabled );
+ EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_NEXTMAP ), bVotesEnabled );
+ EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_NEXTSECRET ), bVotesEnabled );
EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_SPECTATOR ), bVotesEnabled );
}
@@ -925,6 +929,8 @@
SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_MAP, BM_SETCHECK, ( !sv_nomapvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_CHANGEMAP, BM_SETCHECK, ( !sv_nochangemapvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_FLAG, BM_SETCHECK, ( !sv_noflagvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
+ SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_NEXTMAP, BM_SETCHECK, ( !sv_nonextmapvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
+ SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_NEXTSECRET, BM_SETCHECK, ( !sv_nonextsecretvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_SPECTATOR, BM_SETCHECK, ( sv_nocallvote != 2 ? BST_CHECKED : BST_UNCHECKED ), 0 );
settings_AccessTab_ShowOrHideItems( hDlg );
diff -r 366f5d10bc73 wadsrc/static/menudef.za
--- a/wadsrc/static/menudef.za Sat Oct 30 13:16:29 2021 -0400
+++ b/wadsrc/static/menudef.za Wed Nov 03 01:29:17 2021 +0000
@@ -303,6 +303,7 @@
SubMenu "Kick a player", "ZA_CallKickVote"
SubMenu "Change the map", "ZA_CallMapVote"
+ SubMenu "Go to the next map", "ZA_CallNextMapVote"
SubMenu "Change a limit", "ZA_CallLimitVote"
SubMenu "Change a flag", "ZA_CallFlagVote"
}
@@ -351,6 +352,19 @@
Command "Vote!", "menu_callflagvote"
}
+OptionMenu ZA_CallNextMapVote
+{
+ Title "GO TO NEXT MAP"
+
+ Option "Go to secret map", "menu_callvotenextsecret", "YesNo"
+ StaticText " "
+ StaticText "Note that if this map lacks a secret exit, then", 1
+ StaticText "going to the secret map will just exit normally.", 1
+ StaticText " "
+ TextField "Reason for change", "menu_callvotereason"
+ Command "Vote!", "menu_callnextmapvote"
+}
+
// =================================================================================================
//
// IGNORE A PLAYER MENU
@@ -615,6 +629,8 @@
Option "Force spectate votes", "sv_noforcespecvote", "NoYes"
Option "Map votes", "sv_nomapvote", "NoYes"
Option "Changemap votes", "sv_nochangemapvote", "NoYes"
+ Option "Next map votes", "sv_nonextmapvote", "NoYes"
+ Option "Secret map votes", "sv_nonextsecretvote", "NoYes"
Option "Frag limit votes", "sv_nofraglimitvote", "NoYes"
Option "Time limit votes", "sv_notimelimitvote", "NoYes"
Option "Win limit votes", "sv_nowinlimitvote", "NoYes"
# HG changeset patch
# User Sean Baggaley <sean@csnxs.uk>
# Date 1635903022 0
# Wed Nov 03 01:30:22 2021 +0000
# Node ID ffffffffffffffffffffffffffffffffffffffff
# Parent 366f5d10bc73521ba6d04d70cc411d898605d85b
diff -r 366f5d10bc73 docs/zandronum-history.txt
--- a/docs/zandronum-history.txt Sat Oct 30 13:16:29 2021 -0400
+++ b/docs/zandronum-history.txt Wed Nov 03 01:30:22 2021 +0000
@@ -61,6 +61,7 @@
+ - Added DMFlags: "sv_shootthroughallies" and "sv_dontpushallies", so a player's attacks can pass through and not push their allies. [Kaminsky]
+ - Added packet loss mitigation, which the client can control using the CVar "cl_backupcommands". [Kaminsky]
+ - Added the server CVAR "sv_country", which allows servers to present their country to launchers. [Sean]
++ - Added the new nextmap and nextsecret vote types. [Sean]
- - Fixed: Bots tries to jump to reach item when sv_nojump is true. [sleep]
- - Fixed: ACS function SetSkyScrollSpeed didn't work online. [Edward-san]
- - Fixed: color codes in callvote reasons weren't terminated properly. [Dusk]
diff -r 366f5d10bc73 src/callvote.cpp
--- a/src/callvote.cpp Sat Oct 30 13:16:29 2021 -0400
+++ b/src/callvote.cpp Wed Nov 03 01:30:22 2021 +0000
@@ -101,6 +101,7 @@
static bool callvote_CheckValidity( FString &Command, FString &Parameters );
static ULONG callvote_GetVoteType( const char *pszCommand );
static bool callvote_IsKickVote( const ULONG ulVoteType );
+static bool callvote_VoteHasParameters( const ULONG ulVoteType );
static bool callvote_IsFlagValid( const char *pszName );
//*****************************************************************************
@@ -352,8 +353,13 @@
// Create the vote console command.
g_VoteCommand = Command;
- g_VoteCommand += " ";
- g_VoteCommand += Parameters;
+ // [SB] Only include parameters if there actually are any
+ if ( Parameters.Len() > 0 )
+ {
+ g_VoteCommand += " ";
+ g_VoteCommand += Parameters;
+ }
+
g_ulVoteCaller = ulPlayer;
g_VoteReason = Reason.Left(25);
@@ -1073,6 +1079,19 @@
Parameters.Format( "%s", parameterInt ? "true" : "false" );
}
break;
+ case VOTECMD_NEXTMAP:
+ case VOTECMD_NEXTSECRET:
+ {
+ const char *next = ( ulVoteCmd == VOTECMD_NEXTSECRET ? G_GetSecretExitMap() : G_GetExitMap() );
+
+ if ( !next || !P_CheckIfMapExists( next ) )
+ {
+ SERVER_PrintfPlayer( SERVER_GetCurrentClient( ), "There is no next map, or it does not exist.\n" );
+ return ( false );
+ }
+ }
+ break;
+
default:
return ( false );
@@ -1104,6 +1123,10 @@
return VOTECMD_DUELLIMIT;
else if ( stricmp( "pointlimit", pszCommand ) == 0 )
return VOTECMD_POINTLIMIT;
+ else if ( stricmp( "nextmap", pszCommand ) == 0 )
+ return VOTECMD_NEXTMAP;
+ else if ( stricmp( "nextsecret", pszCommand ) == 0 )
+ return VOTECMD_NEXTSECRET;
else if ( callvote_IsFlagValid( pszCommand ))
return VOTECMD_FLAG;
@@ -1119,6 +1142,21 @@
//*****************************************************************************
//
+static bool callvote_VoteHasParameters( const ULONG ulVoteType )
+{
+ switch ( ulVoteType )
+ {
+ case VOTECMD_NEXTMAP:
+ case VOTECMD_NEXTSECRET:
+ return ( false );
+
+ default:
+ return ( true );
+ }
+}
+
+//*****************************************************************************
+//
static bool callvote_IsFlagValid( const char *pszName )
{
// [AK] Check to make sure the CVar the client sent by name actually exists.
@@ -1172,6 +1210,8 @@
CVAR( Bool, sv_noduellimitvote, false, CVAR_ARCHIVE | CVAR_SERVERINFO );
CVAR( Bool, sv_nopointlimitvote, false, CVAR_ARCHIVE | CVAR_SERVERINFO );
CVAR( Bool, sv_noflagvote, true, CVAR_ARCHIVE | CVAR_SERVERINFO );
+CVAR( Bool, sv_nonextmapvote, false, CVAR_ARCHIVE | CVAR_SERVERINFO );
+CVAR( Bool, sv_nonextsecretvote, false, CVAR_ARCHIVE | CVAR_SERVERINFO );
CVAR( Int, sv_votecooldown, 5, CVAR_ARCHIVE | CVAR_SERVERINFO );
CVAR( Int, sv_voteconnectwait, 0, CVAR_ARCHIVE | CVAR_SERVERINFO ); // [RK] The amount of seconds after client connect to wait before voting
CVAR( Bool, cl_showfullscreenvote, false, CVAR_ARCHIVE );
@@ -1182,6 +1222,9 @@
ULONG ulVoteCmd;
char szArgument[128];
+ // [SB] Prevent the arguments buffer from being full of garbage when the vote has no parameters
+ szArgument[0] = '\0';
+
// Don't allow a vote unless the player is a client.
if ( NETWORK_GetState( ) != NETSTATE_CLIENT )
{
@@ -1192,9 +1235,9 @@
if ( CLIENT_GetConnectionState( ) != CTS_ACTIVE )
return;
- if ( argv.argc( ) < 3 )
+ if ( argv.argc( ) < 2 )
{
- Printf( "callvote <command> <parameters> [reason]: Calls a vote\n" );
+ Printf( "callvote <command> [parameters] [reason]: Calls a vote\n" );
return;
}
@@ -1212,14 +1255,23 @@
return;
}
+ bool hasParameters = callvote_VoteHasParameters( ulVoteCmd );
+
+ if ( hasParameters && argv.argc( ) < 3 )
+ {
+ Printf( "That vote type requires a parameter.\n" );
+ return;
+ }
+
// [AK] If we're calling a flag vote, put the CVar's name and the parameter together.
if ( ulVoteCmd == VOTECMD_FLAG )
sprintf( szArgument, "%s %s", argv[1], argv[2] );
- else
+ else if ( hasParameters )
sprintf( szArgument, "%s", argv[2] );
- if ( argv.argc( ) >= 4 )
- CLIENTCOMMANDS_CallVote( ulVoteCmd, szArgument, argv[3] );
+ int reasonOffset = hasParameters ? 1 : 0;
+ if ( argv.argc( ) >= 3 + reasonOffset )
+ CLIENTCOMMANDS_CallVote( ulVoteCmd, szArgument, argv[2 + reasonOffset] );
else
CLIENTCOMMANDS_CallVote( ulVoteCmd, szArgument, "" );
/*
diff -r 366f5d10bc73 src/callvote.h
--- a/src/callvote.h Sat Oct 30 13:16:29 2021 -0400
+++ b/src/callvote.h Wed Nov 03 01:30:22 2021 +0000
@@ -78,6 +78,8 @@
VOTECMD_DUELLIMIT,
VOTECMD_POINTLIMIT,
VOTECMD_FLAG,
+ VOTECMD_NEXTMAP,
+ VOTECMD_NEXTSECRET,
NUM_VOTECMDS
};
@@ -159,6 +161,8 @@
EXTERN_CVAR( Bool, sv_noduellimitvote );
EXTERN_CVAR( Bool, sv_nopointlimitvote );
EXTERN_CVAR( Bool, sv_noflagvote );
+EXTERN_CVAR( Bool, sv_nonextmapvote );
+EXTERN_CVAR( Bool, sv_nonextsecretvote );
EXTERN_CVAR( Int, sv_votecooldown );
EXTERN_CVAR( Int, sv_voteconnectwait );
EXTERN_CVAR( Bool, cl_showfullscreenvote )
diff -r 366f5d10bc73 src/menu/multiplayermenu.cpp
--- a/src/menu/multiplayermenu.cpp Sat Oct 30 13:16:29 2021 -0400
+++ b/src/menu/multiplayermenu.cpp Wed Nov 03 01:30:22 2021 +0000
@@ -128,6 +128,7 @@
CVAR ( Int, menu_skirmishmodifier, 0, CVAR_ARCHIVE )
CVAR ( Int, menu_callvotemap, 0, 0 )
CVAR ( Bool, menu_callvoteintermission, true, 0 )
+CVAR ( Bool, menu_callvotenextsecret, false, 0 )
CVAR ( String, menu_callvotereason, "", 0 )
CVAR ( String, menu_callvoteflag, "", 0 )
CVAR ( Int, menu_callvotelimit, 0, 0 )
@@ -685,6 +686,24 @@
}
}
+// =================================================================================================
+//
+//
+//
+//
+//
+// =================================================================================================
+
+static void M_CallNextMapVote()
+{
+ FString command;
+ command.Format("callvote %s \"%s\"",
+ menu_callvotenextsecret ? "nextsecret" : "nextmap",
+ *menu_callvotereason);
+ C_DoCommand(command);
+ M_ClearMenus();
+}
+
//=================================================================================================
//
// [TP] M_ExecuteIgnore
@@ -921,6 +940,11 @@
M_CallFlagVote();
}
+CCMD ( menu_callnextmapvote )
+{
+ M_CallNextMapVote();
+}
+
CCMD ( menu_autoselect )
{
M_AutoSelect();
diff -r 366f5d10bc73 src/sv_main.cpp
--- a/src/sv_main.cpp Sat Oct 30 13:16:29 2021 -0400
+++ b/src/sv_main.cpp Wed Nov 03 01:30:22 2021 +0000
@@ -7099,6 +7099,16 @@
bVoteAllowed = !sv_noflagvote;
sprintf( szCommand, "flag" );
break;
+ case VOTECMD_NEXTMAP:
+
+ bVoteAllowed = !sv_nonextmapvote;
+ sprintf( szCommand, "nextmap" );
+ break;
+ case VOTECMD_NEXTSECRET:
+
+ bVoteAllowed = !sv_nonextsecretvote;
+ sprintf( szCommand, "nextsecret" );
+ break;
default:
return ( false );
diff -r 366f5d10bc73 src/win32/serverconsole/resource.h
--- a/src/win32/serverconsole/resource.h Sat Oct 30 13:16:29 2021 -0400
+++ b/src/win32/serverconsole/resource.h Wed Nov 03 01:30:22 2021 +0000
@@ -232,6 +232,8 @@
#define IDC_ALLOWRCON 4072
#define IDC_LOGFILENAME_TIMESTAMP 4073
#define IDC_VIEWLOGFILE 4082
+#define IDC_ALLOWVOTE_NEXTMAP 4083
+#define IDC_ALLOWVOTE_NEXTSECRET 4084
#define ID_ADMIN_ADDREMOVEBOT 40000
#define IDC_LMSWEAPONS_VALUE 40001
#define IDR_JOIN_SERVER 40001
diff -r 366f5d10bc73 src/win32/serverconsole/serverconsole.rc
--- a/src/win32/serverconsole/serverconsole.rc Sat Oct 30 13:16:29 2021 -0400
+++ b/src/win32/serverconsole/serverconsole.rc Wed Nov 03 01:30:22 2021 +0000
@@ -439,7 +439,7 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_SERVERSETTINGS_ACCESSTAB DIALOGEX 1, 13, 330, 164
+IDD_SERVERSETTINGS_ACCESSTAB DIALOGEX 1, 13, 330, 184
STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILDWINDOW
FONT 8, "Tahoma", 400, 0, 1
{
@@ -454,24 +454,26 @@
EDITTEXT IDC_MAXPLAYERS, 34, 114, 32, 14, ES_AUTOHSCROLL | ES_NUMBER, WS_EX_LEFT
CONTROL "", IDC_SPIN6, UPDOWN_CLASS, UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_AUTOBUDDY | UDS_SETBUDDYINT, 54, 114, 12, 14, WS_EX_LEFT
GROUPBOX "Passwords", IDC_STATIC, 15, 9, 136, 77, 0, WS_EX_LEFT
- GROUPBOX "Voting", IDC_STATIC, 166, 9, 131, 132, 0, WS_EX_LEFT
+ GROUPBOX "Voting", IDC_STATIC, 166, 9, 131, 152, 0, WS_EX_LEFT
AUTOCHECKBOX "Allow users to call votes", IDC_ALLOW_CALLVOTE, 180, 23, 93, 10, 0, WS_EX_LEFT
AUTOCHECKBOX "Allow kicks", IDC_ALLOWVOTE_KICKLIMIT, 194, 34, 50, 9, 0, WS_EX_LEFT
AUTOCHECKBOX "Allow map votes", IDC_ALLOWVOTE_MAP, 194, 44, 77, 10, 0, WS_EX_LEFT
AUTOCHECKBOX "Allow changemap votes", IDC_ALLOWVOTE_CHANGEMAP, 194, 54, 92, 10, 0, WS_EX_LEFT
- AUTOCHECKBOX "Allow frag limit changes", IDC_ALLOWVOTE_FRAGLIMIT, 194, 64, 91, 10, 0, WS_EX_LEFT
- AUTOCHECKBOX "Allow time limit changes", IDC_ALLOWVOTE_TIMELIMIT, 194, 74, 91, 10, 0, WS_EX_LEFT
- AUTOCHECKBOX "Allow win limit changes", IDC_ALLOWVOTE_WINLIMIT, 194, 84, 89, 10, 0, WS_EX_LEFT
- AUTOCHECKBOX "Allow duel limit changes", IDC_ALLOWVOTE_DUELLIMIT, 194, 94, 91, 10, 0, WS_EX_LEFT
- AUTOCHECKBOX "Allow point limit changes", IDC_ALLOWVOTE_POINTLIMIT, 194, 104, 93, 10, 0, WS_EX_LEFT
- AUTOCHECKBOX "Allow flag changes", IDC_ALLOWVOTE_FLAG, 194, 114, 90, 10, 0, WS_EX_LEFT
- AUTOCHECKBOX "Allow spectators to vote", IDC_ALLOWVOTE_SPECTATOR, 194, 124, 94, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow next map votes", IDC_ALLOWVOTE_NEXTMAP, 194, 64, 90, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow secret map votes", IDC_ALLOWVOTE_NEXTSECRET, 194, 74, 90, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow frag limit changes", IDC_ALLOWVOTE_FRAGLIMIT, 194, 84, 91, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow time limit changes", IDC_ALLOWVOTE_TIMELIMIT, 194, 94, 91, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow win limit changes", IDC_ALLOWVOTE_WINLIMIT, 194, 104, 89, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow duel limit changes", IDC_ALLOWVOTE_DUELLIMIT, 194, 114, 91, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow point limit changes", IDC_ALLOWVOTE_POINTLIMIT, 194, 124, 93, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow flag changes", IDC_ALLOWVOTE_FLAG, 194, 134, 90, 10, 0, WS_EX_LEFT
+ AUTOCHECKBOX "Allow spectators to vote", IDC_ALLOWVOTE_SPECTATOR, 194, 144, 94, 10, 0, WS_EX_LEFT
}
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_SERVERSETTINGS_ADMINTAB DIALOGEX 1, 13, 330, 164
+IDD_SERVERSETTINGS_ADMINTAB DIALOGEX 1, 13, 330, 184
STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILDWINDOW
FONT 8, "Tahoma", 400, 0, 1
{
@@ -493,24 +495,24 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_SERVERSETTINGS_DIALOG DIALOGEX 0, 0, 343, 229
+IDD_SERVERSETTINGS_DIALOG DIALOGEX 0, 0, 343, 249
STYLE DS_CENTER | DS_MODALFRAME | DS_SETFONT | WS_CAPTION | WS_POPUP | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Configure server"
FONT 8, "Tahoma", 400, 0, 0
{
ICON IDI_ICOSETTINGS, IDC_STATIC, 9, 9, 171, 158, SS_ICON, WS_EX_LEFT
- CONTROL "", IDC_SETTINGSTAB, WC_TABCONTROL, WS_TABSTOP, 4, 39, 332, 164, WS_EX_LEFT
- PUSHBUTTON "OK", IDOK, 174, 209, 50, 14, 0, WS_EX_LEFT
- PUSHBUTTON "Cancel", IDCANCEL, 229, 209, 50, 14, 0, WS_EX_LEFT
- PUSHBUTTON "&Help", IDNO, 284, 209, 50, 14, WS_DISABLED, WS_EX_LEFT
+ CONTROL "", IDC_SETTINGSTAB, WC_TABCONTROL, WS_TABSTOP, 4, 39, 332, 184, WS_EX_LEFT
+ PUSHBUTTON "OK", IDOK, 174, 229, 50, 14, 0, WS_EX_LEFT
+ PUSHBUTTON "Cancel", IDCANCEL, 229, 229, 50, 14, 0, WS_EX_LEFT
+ PUSHBUTTON "&Help", IDNO, 284, 229, 50, 14, WS_DISABLED, WS_EX_LEFT
LTEXT "Configure server", IDC_TITLE, 40, 11, 172, 19, SS_LEFT, WS_EX_LEFT
}
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_SERVERSETTINGS_GAMEPLAYTAB DIALOGEX 1, 13, 330, 164
+IDD_SERVERSETTINGS_GAMEPLAYTAB DIALOGEX 1, 13, 330, 184
STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILDWINDOW
FONT 8, "Tahoma", 400, 0, 1
{
@@ -548,7 +550,7 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-IDD_SERVERSETTINGS_SERVERTAB DIALOGEX 1, 13, 330, 164
+IDD_SERVERSETTINGS_SERVERTAB DIALOGEX 1, 13, 330, 184
STYLE DS_CONTROL | DS_SHELLFONT | WS_VISIBLE | WS_CHILDWINDOW
FONT 8, "Tahoma", 400, 0, 1
{
diff -r 366f5d10bc73 src/win32/serverconsole/serverconsole_settings.cpp
--- a/src/win32/serverconsole/serverconsole_settings.cpp Sat Oct 30 13:16:29 2021 -0400
+++ b/src/win32/serverconsole/serverconsole_settings.cpp Wed Nov 03 01:30:22 2021 +0000
@@ -365,6 +365,8 @@
sv_nomapvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_MAP, BM_GETCHECK, 0, 0 );
sv_nochangemapvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_CHANGEMAP, BM_GETCHECK, 0, 0 );
sv_noflagvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_FLAG, BM_GETCHECK, 0, 0 );
+ sv_nonextmapvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_NEXTMAP, BM_GETCHECK, 0, 0 );
+ sv_nonextsecretvote = !SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_NEXTSECRET, BM_GETCHECK, 0, 0 );
GetDlgItemText( hDlg, IDC_PASSWORD, szBuffer, 1024 );
sv_password = szBuffer;
@@ -871,6 +873,8 @@
EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_TIMELIMIT ), bVotesEnabled );
EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_WINLIMIT ), bVotesEnabled );
EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_FLAG ), bVotesEnabled );
+ EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_NEXTMAP ), bVotesEnabled );
+ EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_NEXTSECRET ), bVotesEnabled );
EnableWindow( GetDlgItem( hDlg, IDC_ALLOWVOTE_SPECTATOR ), bVotesEnabled );
}
@@ -925,6 +929,8 @@
SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_MAP, BM_SETCHECK, ( !sv_nomapvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_CHANGEMAP, BM_SETCHECK, ( !sv_nochangemapvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_FLAG, BM_SETCHECK, ( !sv_noflagvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
+ SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_NEXTMAP, BM_SETCHECK, ( !sv_nonextmapvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
+ SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_NEXTSECRET, BM_SETCHECK, ( !sv_nonextsecretvote ? BST_CHECKED : BST_UNCHECKED ), 0 );
SendDlgItemMessage( hDlg, IDC_ALLOWVOTE_SPECTATOR, BM_SETCHECK, ( sv_nocallvote != 2 ? BST_CHECKED : BST_UNCHECKED ), 0 );
settings_AccessTab_ShowOrHideItems( hDlg );
diff -r 366f5d10bc73 wadsrc/static/menudef.za
--- a/wadsrc/static/menudef.za Sat Oct 30 13:16:29 2021 -0400
+++ b/wadsrc/static/menudef.za Wed Nov 03 01:30:22 2021 +0000
@@ -303,6 +303,7 @@
SubMenu "Kick a player", "ZA_CallKickVote"
SubMenu "Change the map", "ZA_CallMapVote"
+ SubMenu "Go to the next map", "ZA_CallNextMapVote"
SubMenu "Change a limit", "ZA_CallLimitVote"
SubMenu "Change a flag", "ZA_CallFlagVote"
}
@@ -351,6 +352,19 @@
Command "Vote!", "menu_callflagvote"
}
+OptionMenu ZA_CallNextMapVote
+{
+ Title "GO TO NEXT MAP"
+
+ Option "Go to secret map", "menu_callvotenextsecret", "YesNo"
+ StaticText " "
+ StaticText "Note that if this map lacks a secret exit, then", 1
+ StaticText "going to the secret map will just exit normally.", 1
+ StaticText " "
+ TextField "Reason for change", "menu_callvotereason"
+ Command "Vote!", "menu_callnextmapvote"
+}
+
// =================================================================================================
//
// IGNORE A PLAYER MENU
@@ -615,6 +629,8 @@
Option "Force spectate votes", "sv_noforcespecvote", "NoYes"
Option "Map votes", "sv_nomapvote", "NoYes"
Option "Changemap votes", "sv_nochangemapvote", "NoYes"
+ Option "Next map votes", "sv_nonextmapvote", "NoYes"
+ Option "Secret map votes", "sv_nonextsecretvote", "NoYes"
Option "Frag limit votes", "sv_nofraglimitvote", "NoYes"
Option "Time limit votes", "sv_notimelimitvote", "NoYes"
Option "Win limit votes", "sv_nowinlimitvote", "NoYes"
| ||||||||
Notes |
|
|
Dusk (developer) 2015-07-15 15:00 |
Added in the votedef branch:'http://bit.ly/1fJcyIy [^]' |
|
Konda (reporter) 2016-06-08 15:43 |
I tested this using WaTaKiD's windows build that was provided here:'https://zandronum.com/tracker/view.php?id=1420#c12949 [^]' Couldn't test this offline, so I had to make a server using Doomseeker. It works fine if the server has no map rotation, but as soon as I try to host with a map rotation the server crashes right after startup:'http://i.imgur.com/wWkl194.png [^]' If I keep the same host settings and change the executable to Zandronum 2.1.2, the server starts without crashing. |
|
DrinkyBird (developer) 2021-11-02 22:25 edited on: 2021-11-03 00:27 |
Given that VOTEDEF won't be happening any time soon, since the source code is old and - most importantly - likely lost, I've implemented this using the existing vote system. An initial patch is attached, feedback appreciated before I turn this into an actual commit. edit: I might have to change when the lump and map name is displayed in the vote message. G_GetExitMap behaves oddly clientside with map rotations as it always returns the next map defined in MAPINFO. If I remove the ( NETWORK_GetState( ) == NETSTATE_SERVER ) check in that function (as the client is aware of the map rotation in 3.1), it always returns the same map. Also just realised that CALLVOTE_BeginVote doesn't check if G_GetExitMap and G_GetSecretExitMap returned NULL, so there's a possible bug... Then again - this is already validated in callvote_CheckValidity - but I fixed it anyway. |
|
DrinkyBird (developer) 2021-11-03 01:30 edited on: 2021-11-03 01:30 |
Decided to ditch the idea of showing the map lump and name in the vote message, due to its weirdness with rotations... edit: and I accidentally left a debug print in... |
|
DrinkyBird (developer) 2021-11-07 20:26 |
'https://osdn.net/projects/zandronum/scm/hg/zandronum-stable/commits/a040fb4c3bf1dd475ca5310286903a8ff69af6f0 [^]' I've already tested it and everything seems to work fine, but I'm leaving this as needs testing for a bit just in case anyone else wants to have look. |
|
This issue is already marked as resolved. If you feel that is not the case, please reopen it and explain why. |
|
| Supporters: | carpathia The Toxic Avenger Hypnotoad unknownna FTW395 agaures Marcaek JC Tenton Korshun djskaarj MaxRideWizardLord Monsterovich Konda Unknown kultasakaali EpicTyphlosion |
| Opponents: | No one explicitly opposes this issue yet. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2015-07-12 15:12 | Hypnotoad | New Issue | |
| 2015-07-15 15:00 | Dusk | Note Added: 0012944 | |
| 2015-07-15 15:00 | Dusk | Relationship added | child of 0001420 |
| 2015-07-15 22:28 | Dusk | Assigned To | => Dusk |
| 2015-07-15 22:28 | Dusk | Status | new => needs testing |
| 2016-06-08 15:43 | Konda | Note Added: 0015058 | |
| 2021-11-02 22:25 | DrinkyBird | Note Added: 0021817 | |
| 2021-11-02 22:25 | DrinkyBird | File Added: 2345.patch | |
| 2021-11-02 22:25 | DrinkyBird | Assigned To | Dusk => |
| 2021-11-02 22:26 | DrinkyBird | Status | needs testing => needs review |
| 2021-11-02 22:43 | DrinkyBird | Note Edited: 0021817 | View Revisions |
| 2021-11-02 22:47 | DrinkyBird | Note Edited: 0021817 | View Revisions |
| 2021-11-03 00:27 | DrinkyBird | Note Edited: 0021817 | View Revisions |
| 2021-11-03 01:29 | DrinkyBird | File Added: 2345_v2.patch | |
| 2021-11-03 01:30 | DrinkyBird | Note Added: 0021818 | |
| 2021-11-03 01:30 | DrinkyBird | Note Edited: 0021818 | View Revisions |
| 2021-11-03 01:30 | DrinkyBird | File Added: 2345_v3.patch | |
| 2021-11-07 20:26 | DrinkyBird | Status | needs review => needs testing |
| 2021-11-07 20:26 | DrinkyBird | Fixed in Version | => 3.1 |
| 2021-11-07 20:26 | DrinkyBird | Target Version | => 3.1 |
| 2021-11-07 20:26 | DrinkyBird | Note Added: 0021824 | |
| 2021-11-29 13:43 | DrinkyBird | Status | needs testing => resolved |
| 2021-11-29 13:43 | DrinkyBird | Resolution | open => fixed |
| 2021-11-29 13:43 | DrinkyBird | Assigned To | => DrinkyBird |
Copyright © 2012-2025, Torr Samaho & Zandronum Team.
Doom and Doom II are the property of id Software.
| Copyright © 2000 - 2025 MantisBT Team |



ZDoom
Doom Wiki
id Software
Doomworld
Odamex
Doomseeker
Internet Doom Explorer
The Sentinel's Playground Servers