diff options
author | Roman Tetelman <kevlarman@gmail.com> | 2009-10-03 12:28:11 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:58 +0000 |
commit | 6ddab7c3ac21bc133f111157a71222a40ba651f3 (patch) | |
tree | f79d5bc555e4b6dca4bb5b6c4c77b3f732cfea59 | |
parent | 80e1e1e116ec0eea3e82c395700e12cc301bbb35 (diff) |
* add printqueue server command to try to debug issue #20
-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 }, |