diff options
author | Petr Pudlak <petr.mvd@gmail.com> | 2014-10-17 21:01:54 +0200 |
---|---|---|
committer | Petr Pudlak <petr.mvd@gmail.com> | 2014-10-18 19:59:22 +0200 |
commit | c8e426354b1b42a6870e7e44c8e92a7fc0531ede (patch) | |
tree | 63850e0431c9336b7e4ea98eb90a23f4f3c8e924 /src/game/g_svcmds.c | |
parent | 9e9289b46d1efad930f09d691ad62fab7f84e8fe (diff) |
Add a command for starting Weak Sudden Death
Diffstat (limited to 'src/game/g_svcmds.c')
-rw-r--r-- | src/game/g_svcmds.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game/g_svcmds.c b/src/game/g_svcmds.c index 915709d..775b4ed 100644 --- a/src/game/g_svcmds.c +++ b/src/game/g_svcmds.c @@ -541,6 +541,19 @@ static void Svcmd_MapLogWrapper( void ) Cmd_MapLog_f( NULL ); } +static void Svcmd_WeakSuddenDeath_f( void ) +{ + char secs[ 5 ]; + int offset; + trap_Argv( 1, secs, sizeof( secs ) ); + offset = atoi( secs ); + + level.weakSuddenDeathBeginTime = level.time - level.startTime + offset * 1000; + trap_SendServerCommand( -1, + va( "cp \"Weak Sudden Death will begin in %d second%s\"", + offset, offset == 1 ? "" : "s" ) ); +} + static void Svcmd_SuddenDeath_f( void ) { char secs[ 5 ]; @@ -646,6 +659,7 @@ struct svcmd { "say_team", qtrue, Svcmd_TeamMessage_f }, { "status", qfalse, Svcmd_Status_f }, { "stopMapRotation", qfalse, G_StopMapRotation }, + { "weaksuddendeath", qfalse, Svcmd_WeakSuddenDeath_f }, { "suddendeath", qfalse, Svcmd_SuddenDeath_f } }; |