]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - csprogs.c
fix bug in last patch - must set trace.endpos AFTER calling TracePoint
[xonotic/darkplaces.git] / csprogs.c
index ae4151ef08ffa040b2e612f4c49e8bb00a1797b9..003eab4cd4061e3dc2d918d1cf93de9ff248c2b5 100644 (file)
--- a/csprogs.c
+++ b/csprogs.c
@@ -5,6 +5,7 @@
 #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[] =
 {