From fd2ff297ba3f0866d8a9e6e923d6a3c68529decc Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sun, 12 Apr 2015 00:10:04 +0200 Subject: Disallow calling admit defeat votes in the first 10 minutes. --- src/game/g_cmds.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/game') diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index cf9b3e4..459c763 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1422,6 +1422,12 @@ void Cmd_CallVote_f( gentity_t *ent ) } else if( !Q_stricmp( vote, "admitdefeat" ) ) { + if( ( ( level.time - level.startTime ) < 60 * 10000 ) ) + { + trap_SendServerCommand( ent-g_entities, "print \"You cannot admit defeat in the first 10 minutes.\n\"" ); + return; + } + Com_sprintf( level.voteString[ team ], sizeof( level.voteString[ team ] ), "admitdefeat %d", team ); strcpy( level.voteDisplayString[ team ], "Admit Defeat" ); -- cgit