void antilag_record(entity e, float t)
{
+ if(e.vehicle)
+ antilag_record(e.vehicle, t);
+
if(time < e.(antilag_times[e.antilag_index]))
return;
e.antilag_index = e.antilag_index + 1;
if(e.antilag_debug)
te_spark(antilag_takebackorigin(e, t - e.antilag_debug), '0 0 0', 32);
+
}
// finds the index BEFORE t
vector antilag_takebackavgvelocity(entity e, float t0, float t1)
{
vector o0, o1;
+
if(t0 >= t1)
return '0 0 0';
o0 = antilag_takebackorigin(e, t0);
void antilag_takeback(entity e, float t)
{
+ if(e.vehicle)
+ antilag_takeback(e.vehicle, t);
+
e.antilag_saved_origin = e.origin;
setorigin(e, antilag_takebackorigin(e, t));
}
void antilag_restore(entity e)
{
+ if(e.vehicle)
+ antilag_restore(e.vehicle);
+
setorigin(e, e.antilag_saved_origin);
}