From f4c9d4eab1992a1c4849b95db7e864ad3264ed1f Mon Sep 17 00:00:00 2001 From: Mikko Tiusanen Date: Sun, 8 Jun 2014 13:50:54 +0300 Subject: Automatically switch level at start of sd when no clients connected. --- src/game/g_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/game/g_main.c b/src/game/g_main.c index 755aee1..3ce85f0 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -2191,6 +2191,16 @@ void CheckExitRules( void ) LogExit( "Aliens win." ); G_MapLog_Result( 'a' ); } + else if( level.time > level.suddenDeathBeginTime && + level.numConnectedClients == 0 ) + { + // Sudden death started but no clients connected + level.lastWin = TEAM_NONE; + trap_SendServerCommand( -1, "print \"Sudden death started with no connected clients\n\"" ); + trap_SetConfigstring( CS_WINNER, "Stalemate" ); + LogExit( "Timelimit hit." ); + G_MapLog_Result( 't' ); + } } /* -- cgit