diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_admin.c | 7 | ||||
-rw-r--r-- | src/game/g_main.c | 11 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 2229ba25..038c8cdb 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -2880,9 +2880,10 @@ qboolean G_admin_pause( gentity_t *ent ) return qfalse; } - AP( va( "print \"^3pause: ^7%s^7 unpaused the game (Paused for %d msec) \n\"", - ( ent ) ? ent->client->pers.netname : "console",level.pausedTime ) ); - trap_SendServerCommand( -1, "cp \"The game has been unpaused!\"" ); + AP( va( "print \"^3pause: ^7%s^7 unpaused the game (Paused for %d sec) \n\"", + ( ent ) ? ent->client->pers.netname : "console", + (int) ( (float) level.pausedTime / 1000.0f ) ) ); + trap_SendServerCommand( -1, "cp \"The game has been unpaused!\"" ); level.pausedTime = 0; } diff --git a/src/game/g_main.c b/src/game/g_main.c index 01292c66..765dfce4 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -2338,6 +2338,10 @@ void G_RunFrame( int levelTime ) { ptime3000 -= 3000; trap_SendServerCommand( -1, "cp \"The game has been paused. Please wait.\"" ); + + if( level.pausedTime >= 110000 && level.pausedTime <= 119000 ) + trap_SendServerCommand( -1, va( "print \"Server: Game will auto-unpause in %d seconds\n\"", + (int) ( (float) ( 120000 - level.pausedTime ) / 1000.0f ) ) ); } // Prevents clients from getting lagged-out messages @@ -2347,6 +2351,13 @@ void G_RunFrame( int levelTime ) level.clients[ i ].ps.commandTime = levelTime; } + if( level.pausedTime > 120000 ) + { + trap_SendServerCommand( -1, "print \"Server: The game has been unpaused automatically (2 minute max)\n\"" ); + trap_SendServerCommand( -1, "cp \"The game has been unpaused!\"" ); + level.pausedTime = 0; + } + return; } |