summaryrefslogtreecommitdiff
path: root/src/game/g_svcmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_svcmds.c')
-rw-r--r--src/game/g_svcmds.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/game/g_svcmds.c b/src/game/g_svcmds.c
index c81ffca1..75d757d1 100644
--- a/src/game/g_svcmds.c
+++ b/src/game/g_svcmds.c
@@ -509,6 +509,19 @@ static void Svcmd_MessageWrapper( void )
G_Say( NULL, SAY_ALL, ConcatArgs( 1 ) );
}
+static void Svcmd_SuddenDeath_f( void )
+{
+ char secs[ 5 ];
+ int offset;
+ trap_Argv( 0, secs, sizeof( secs ) );
+ offset = atoi( secs );
+
+ level.suddenDeathBeginTime = level.time - level.startTime + offset * 1000;
+ trap_SendServerCommand( -1,
+ va( "cp \"Sudden Death will begin in %d second%s\"",
+ offset, offset == 1 ? "" : "s" ) );
+}
+
struct
{
char *cmd;
@@ -536,7 +549,8 @@ struct
{ "say", qtrue, Svcmd_MessageWrapper },
{ "chat", qtrue, Svcmd_Chat_f },
{ "m", qtrue, Svcmd_MessageWrapper },
- { "a", qtrue, Svcmd_MessageWrapper }
+ { "a", qtrue, Svcmd_MessageWrapper },
+ { "suddendeath", qfalse, Svcmd_SuddenDeath_f }
};
/*