[iortcw] 55/95: MP: Don't start a vote when map change or restart is in progress

Simon McVittie smcv at debian.org
Fri Sep 8 10:42:12 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to tag 1.51
in repository iortcw.

commit 40201d2ba17f384dcbd80a3ed5ada7758bbcfd8b
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date:   Sun Apr 30 05:41:45 2017 -0400

    MP: Don't start a vote when map change or restart is in progress
---
 MP/code/game/g_cmds.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/MP/code/game/g_cmds.c b/MP/code/game/g_cmds.c
index fbeb832..f745688 100644
--- a/MP/code/game/g_cmds.c
+++ b/MP/code/game/g_cmds.c
@@ -1491,6 +1491,13 @@ void Cmd_CallVote_f( gentity_t *ent ) {
 
 	// if there is still a vote to be executed
 	if ( level.voteExecuteTime ) {
+		// don't start a vote when map change or restart is in progress
+		if ( !Q_stricmpn( level.voteString, "map", 3 )
+			|| !Q_stricmpn( level.voteString, "nextmap", 7 ) ) {
+			trap_SendServerCommand( ent-g_entities, "print \"Vote after map change.\n\"" );
+			return;
+		}
+
 		level.voteExecuteTime = 0;
 		trap_SendConsoleCommand( EXEC_APPEND, va( "%s\n", level.voteString ) );
 	}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list