diff options
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_local.h | 7 | ||||
-rw-r--r-- | src/cgame/cg_servercmds.c | 40 |
2 files changed, 41 insertions, 6 deletions
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 12ed3c7b..1d22e308 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1788,6 +1788,13 @@ void CG_AddParticles( void ); void CG_ParticleSystemEntity( centity_t *cent ); +// +// cg_ptr.c +// +int CG_ReadPTRCode( void ); +void CG_WritePTRCode( int code ); + +// //=============================================== // diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index 5cad60c3..3c5b9f71 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -896,20 +896,18 @@ static void CG_ServerCommand( void ) if( !strcmp( cmd, "gprintf" ) ) { if( trap_Argc( ) == 2 ) - { CG_TAUIConsole( CG_Argv( 1 ) ); - return; - } + + return; } //the server has triggered a menu if( !strcmp( cmd, "servermenu" ) ) { if( trap_Argc( ) == 2 ) - { CG_Menu( atoi( CG_Argv( 1 ) ) ); - return; - } + + return; } //the server thinks this client should close all menus @@ -941,6 +939,36 @@ static void CG_ServerCommand( void ) return; } + // server requests a ptrc + if( !strcmp( cmd, "ptrcrequest" ) ) + { + int code = CG_ReadPTRCode( ); + + trap_SendClientCommand( va( "ptrcverify %d", code ) ); + return; + } + + // server issues a ptrc + if( !strcmp( cmd, "ptrcissue" ) ) + { + if( trap_Argc( ) == 2 ) + { + int code = atoi( CG_Argv( 1 ) ); + + CG_WritePTRCode( code ); + } + + return; + } + + // reply to ptrcverify + if( !strcmp( cmd, "ptrcconfirm" ) ) + { + trap_SendConsoleCommand( "menu ptrc_popmenu\n" ); + + return; + } + CG_Printf( "Unknown client game command: %s\n", cmd ); } |