summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/g_main.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c
index e142b21a..40ab6487 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -638,7 +638,22 @@ void G_InitGame( int levelTime, int randomSeed, int restart )
G_ResetPTRConnections( );
}
+/*
+==================
+G_ClearVotes
+remove all currently active votes
+==================
+*/
+static void G_ClearVotes( void )
+{
+ level.voteTime = 0;
+ trap_SetConfigstring( CS_VOTE_TIME, "" );
+ level.teamVoteTime[ 0 ] = 0;
+ trap_SetConfigstring( CS_TEAMVOTE_TIME, "" );
+ level.teamVoteTime[ 1 ] = 0;
+ trap_SetConfigstring( CS_TEAMVOTE_TIME + 1, "" );
+}
/*
=================
@@ -647,6 +662,9 @@ G_ShutdownGame
*/
void G_ShutdownGame( int restart )
{
+ // in case of a map_restart
+ G_ClearVotes( );
+
G_Printf( "==== ShutdownGame ====\n" );
if( level.logFile )
@@ -1471,13 +1489,7 @@ void BeginIntermission( void )
level.intermissiontime = level.time;
- // cancel votes
- level.voteTime = 0;
- trap_SetConfigstring( CS_VOTE_TIME, "" );
- level.teamVoteTime[ 0 ] = 0;
- trap_SetConfigstring( CS_TEAMVOTE_TIME, "" );
- level.teamVoteTime[ 1 ] = 0;
- trap_SetConfigstring( CS_TEAMVOTE_TIME + 1, "" );
+ G_ClearVotes( );
FindIntermissionPoint( );