#include "cl_collision.h"
#include "snd_main.h"
#include "clvm_cmds.h"
+#include "prvm_cmds.h"
//============================================================================
// Client prog handling
static prvm_prog_t *csqc_tmpprog;
+void CL_VM_PreventInformationLeaks(void)
+{
+ prvm_eval_t *val;
+ if(!cl.csqc_loaded)
+ return;
+ CSQC_BEGIN
+ VM_ClearTraceGlobals();
+ if ((val = PRVM_GLOBALFIELDVALUE(prog->globaloffsets.trace_networkentity)))
+ val->_float = 0;
+ CSQC_END
+}
+
//[515]: these are required funcs
static char *cl_required_func[] =
{
PRVM_G_FLOAT(OFS_PARM1) = key;
PRVM_G_FLOAT(OFS_PARM2) = ascii;
PRVM_ExecuteProgram(prog->funcoffsets.CSQC_InputEvent, "QC function CSQC_InputEvent is missing");
- r = CSQC_RETURNVAL;
+ r = CSQC_RETURNVAL != 0;
}
CSQC_END
return r;
PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString(cmd);
PRVM_ExecuteProgram(prog->funcoffsets.CSQC_ConsoleCommand, "QC function CSQC_ConsoleCommand is missing");
vm_tempstringsbuf.cursize = restorevm_tempstringsbuf_cursize;
- r = CSQC_RETURNVAL;
+ r = CSQC_RETURNVAL != 0;
}
CSQC_END
return r;
prog->globals.client->time = cl.time;
prog->globals.client->self = cl.csqc_server2csqcentitynumber[cl.playerentity];
PRVM_ExecuteProgram(prog->funcoffsets.CSQC_Parse_TempEntity, "QC function CSQC_Parse_TempEntity is missing");
- r = CSQC_RETURNVAL;
+ r = CSQC_RETURNVAL != 0;
if(!r)
{
msg_readcount = t;
PRVM_G_FLOAT(OFS_PARM4) = attenuation;
VectorCopy(pos, PRVM_G_VECTOR(OFS_PARM5) );
PRVM_ExecuteProgram(prog->funcoffsets.CSQC_Event_Sound, "QC function CSQC_Event_Sound is missing");
- r = CSQC_RETURNVAL;
+ r = CSQC_RETURNVAL != 0;
}
CSQC_END
}