summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorTony J. White <tjw@tjw.org>2007-03-03 07:04:02 +0000
committerTony J. White <tjw@tjw.org>2007-03-03 07:04:02 +0000
commit201999a61546b1f2d54007e31e406e9be47b2069 (patch)
tree92f5daf7c9ee1f05ca483a1a454157b5fba89d9c /src/game
parentf6fde24c7eef3300171eeb13683d16f63cced94d (diff)
* (bug 3036) clear votes in G_ShutdownGame() in case map_restart was used
Diffstat (limited to 'src/game')
-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( );