CSQC_END
}
}
+
+void CSQC_UpdateNetworkTimes(double newtime, double oldtime)
+{
+ prvm_eval_t *val;
+ if(!cl.csqc_loaded)
+ return;
+ CSQC_BEGIN
+ if ((val = PRVM_GLOBALFIELDVALUE(prog->globaloffsets.servertime)))
+ val->_float = newtime;
+ if ((val = PRVM_GLOBALFIELDVALUE(prog->globaloffsets.serverprevtime)))
+ val->_float = oldtime;
+ if ((val = PRVM_GLOBALFIELDVALUE(prog->globaloffsets.serverdeltatime)))
+ val->_float = newtime - oldtime;
+ CSQC_END
+}
+
//[515]: set globals before calling R_UpdateView, WEIRD CRAP
static void CSQC_SetGlobals (void)
{
// self.frame1time is the animation base time for the interpolation target
// self.frame2 is the interpolation start (previous frame)
// self.frame2time is the animation base time for the interpolation start
- entrender->frame1 = entrender->frame2 = ed->fields.client->frame;
- if ((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.frame2))) entrender->frame2 = val->_float;
+ entrender->frame1 = entrender->frame2 = (int) ed->fields.client->frame;
+ if ((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.frame2))) entrender->frame2 = (int) val->_float;
if ((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.frame1time))) entrender->frame2time = val->_float;
if ((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.frame2time))) entrender->frame1time = val->_float;
if ((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.lerpfrac))) entrender->framelerp = val->_float;
CSQC_END
}
}
-qboolean CL_VM_Event_Sound(int sound_num, int volume, int channel, float attenuation, int ent, vec3_t pos)
+qboolean CL_VM_Event_Sound(int sound_num, float volume, int channel, float attenuation, int ent, vec3_t pos)
{
qboolean r = false;
if(cl.csqc_loaded)
sizebuf_t sb;
unsigned char *demobuf; fs_offset_t demofilesize;
- sb.data = (void *) buf;
+ sb.data = (unsigned char *) buf;
sb.maxsize = sizeof(buf);
i = 0;