diff options
-rw-r--r-- | src/game/g_local.h | 1 | ||||
-rw-r--r-- | src/game/g_svcmds.c | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/game/g_local.h b/src/game/g_local.h index 7d7dd725..389530a2 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -466,6 +466,7 @@ qboolean G_SearchSpawnQueue( spawnQueue_t *sq, int clientNum ); qboolean G_PushSpawnQueue( spawnQueue_t *sq, int clientNum ); qboolean G_RemoveFromSpawnQueue( spawnQueue_t *sq, int clientNum ); int G_GetPosInSpawnQueue( spawnQueue_t *sq, int clientNum ); +void G_PrintSpawnQueue( spawnQueue_t *sq ); #define MAX_DAMAGE_REGION_TEXT 8192 diff --git a/src/game/g_svcmds.c b/src/game/g_svcmds.c index 2faec6bf..096b861d 100644 --- a/src/game/g_svcmds.c +++ b/src/game/g_svcmds.c @@ -451,6 +451,33 @@ static void Svcmd_DumpUser_f( void ) } } +static void Svcmd_PrintQueue_f( void ) +{ + char team[ MAX_STRING_CHARS ]; + + if( trap_Argc() != 2 ) + { + G_Printf( "usage: printqueue <team>\n" ); + return; + } + + trap_Argv( 1, team, sizeof( team ) ); + + switch( team[0] ) + { + case 'a': + G_PrintSpawnQueue( &level.alienSpawnQueue ); + break; + + case 'h': + G_PrintSpawnQueue( &level.humanSpawnQueue ); + break; + + default: + G_Printf( "unknown team\n" ); + } +} + // dumb wrapper for "a" and "m" static void Svcmd_MessageWrapper( void ) { @@ -482,6 +509,7 @@ struct { "dumpuser", qfalse, Svcmd_DumpUser_f }, { "admitDefeat", qfalse, Svcmd_AdmitDefeat_f }, { "evacuation", qfalse, Svcmd_Evacuation_f }, + { "printqueue", qfalse, Svcmd_PrintQueue_f }, // don't handle communication commands unless dedicated { "say_team", qtrue, Svcmd_TeamMessage_f }, { "say", qtrue, Svcmd_SendMessage }, |