added the trap_IsRecordingDemo syscall for CPMA 1.52+

This commit is contained in:
myT 2018-12-08 00:55:21 +01:00
parent 2f70685fa3
commit 51cda86421
3 changed files with 8 additions and 1 deletions

View file

@ -1,6 +1,8 @@
DD Mmm 18 - 1.51
add: demo recording status query extension for CPMA 1.52+
add: /cvar_add <cvar> <number> to add a number to a cvar
add: /cvar_mul <cvar> <number> to multiply a cvar by a number

View file

@ -335,6 +335,7 @@ static qbool CL_CG_GetValue( char* value, int valueSize, const char* key )
{ "trap_Cmd_SetHelp", CG_EXT_CMD_SETHELP },
{ "trap_MatchAlertEvent", CG_EXT_MATCHALERTEVENT },
{ "trap_Error2", CG_EXT_ERROR2 },
{ "trap_IsRecordingDemo", CG_EXT_ISRECORDINGDEMO },
// commands
{ "screenshotnc", 1 },
{ "screenshotncJPEG", 1 },
@ -648,6 +649,9 @@ static intptr_t CL_CgameSystemCalls( intptr_t *args )
Com_ErrorExt( ERR_DROP, EXT_ERRMOD_CGAME, (qbool)args[2], "%s", (const char*)VMA(1) );
return 0;
case CG_EXT_ISRECORDINGDEMO:
return clc.demorecording;
default:
Com_Error( ERR_DROP, "Bad cgame system trap: %i", args[0] );
}

View file

@ -188,7 +188,8 @@ typedef enum {
CG_EXT_CVAR_SETHELP,
CG_EXT_CMD_SETHELP,
CG_EXT_MATCHALERTEVENT,
CG_EXT_ERROR2
CG_EXT_ERROR2,
CG_EXT_ISRECORDINGDEMO
} cgameImport_t;