summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2015-04-12 00:10:04 +0200
committerPaweł Redman <pawel.redman@gmail.com>2015-04-12 00:10:04 +0200
commitfd2ff297ba3f0866d8a9e6e923d6a3c68529decc (patch)
tree4875e38cf0f4551a5c014c98db71b5a02b46333e /src
parent0175e7359309ffc34eeac159e69fc8bf78f2f226 (diff)
Disallow calling admit defeat votes in the first 10 minutes.
Diffstat (limited to 'src')
-rw-r--r--src/game/g_cmds.c6
1 files changed, 6 insertions, 0 deletions
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" );