diff options
author | Tim Angus <tim@ngus.net> | 2004-11-30 23:05:20 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2004-11-30 23:05:20 +0000 |
commit | 8c4f8eaf275d8ab974e106d625a305440d16e1ee (patch) | |
tree | f6febb320de4d4a625d3e3f5d399b4fb9279a65c /src/cgame | |
parent | 798ec438387193c4cf928ab36b59e982b194cf7a (diff) |
* PTRC (post timeout restoration code) system
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 ); } |