diff --git a/reaction/code/client/cl_cgame.c b/reaction/code/client/cl_cgame.c index 3c351a13..8c01d06d 100644 --- a/reaction/code/client/cl_cgame.c +++ b/reaction/code/client/cl_cgame.c @@ -401,6 +401,17 @@ void CL_ShutdownCGame( void ) { cgvm = NULL; } +/* +==================== +CL_RQ3_Key_KeynumToStringBuf +==================== +*/ +static void CL_RQ3_Key_KeynumToStringBuf( int keynum, char *buf, int buflen ) { + Q_strncpyz( buf, Key_KeynumToString( keynum ), buflen ); +} + + + static int FloatAsInt( float f ) { floatint_t fi; fi.f = f; @@ -699,6 +710,10 @@ intptr_t CL_CgameSystemCalls( intptr_t *args ) { case CG_R_INPVS: return re.inPVS( VMA(1), VMA(2) ); + case CG_RQ3_KEY_KEYNUMTOSTRINGBUF: + CL_RQ3_Key_KeynumToStringBuf( args[1], VMA(2), args[3] ); + return 0; + default: assert(0); Com_Error( ERR_DROP, "Bad cgame system trap: %ld", (long int) args[0] );