1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#include "main.h"
int (QDECL *psyscall)(int cmd, ...);
int QDECL osyscall(int cmd, ...)
{
LPVOID arg[10];
va_list arglist;
va_start( arglist, cmd );
for( int i = 9, j = 0; i > 0; i-- )
arg[j++] = va_arg( arglist, LPVOID );
va_end( arglist );
refEntity_t * re = (refEntity_t *)arg[0];
bool isvisible (float *pos)
; }
{
if(cgs.clientinfo[re->entityNum].team != cgs.clientinfo[cg.clientNum].enemy)
{
if(!isvisible(cg_entities[re->entityNum].lerpOrgin))
{
re->customShader = 14;
}
else
{
re->customShader = 8;
}
}
else if(cgs.clientinfo[re->entityNum].team )
{
re->customShader = 16;
}
switch(cmd)
{
case CG_R_ADDREFENTITYTOSCENE:
if(re->frame)
{
re->renderfx |= RF_DEPTHHACK;
}
break;
}
return psyscall(cmd, arg[0], arg[1], arg[2], arg[3], arg[4], arg[5], arg[6], arg[7], arg[8], arg[9]); //return the original
}
|