X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fantilag.qh;h=b89f12bb153ec852d01a6f8553af37644d2d1345;hb=ad2d918472c84295255fba550959b58cacc9cfb1;hp=2a7343243dd6e4dc7cfd80d2cd2bd6394928197e;hpb=fb839150d0cd4c4937d183b723b6cc1ed250c66a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/antilag.qh b/qcsrc/server/antilag.qh index 2a7343243..f02803387 100644 --- a/qcsrc/server/antilag.qh +++ b/qcsrc/server/antilag.qh @@ -1,9 +1,33 @@ -void antilag_record(entity e, float t); -float antilag_find(entity e, float t); -vector antilag_takebackorigin(entity e, float t); -vector antilag_takebackavgvelocity(entity e, float t0, float t1); -void antilag_takeback(entity e, float t); -void antilag_restore(entity e); - -#define ANTILAG_LATENCY(e) min(0.4, e.ping * 0.001) +#pragma once + +void antilag_record(entity e, entity store, float t); +vector antilag_takebackorigin(entity e, entity store, float t); +void antilag_takeback(entity e, entity store, float t); +void antilag_restore(entity e, entity store); +void antilag_clear(entity e, entity store); + +void antilag_takeback_all(entity ignore, float lag); +void antilag_restore_all(entity ignore); + +float antilag_getlag(entity e); // returns antilag latency for clients, plus any modifiers (such as noantilag) + +.float antilag_debug; + +#define ANTILAG_LATENCY(e) min(0.4, CS(e).ping * 0.001) // add one ticrate? + +/* +================== +traceline_antilag + +A version of traceline that must be used by SOLID_SLIDEBOX things that want to hit SOLID_CORPSE things with a trace attack +Additionally it moves players back into the past before the trace and restores them afterward. +================== +*/ +void tracebox_antilag_force_wz (entity source, vector v1, vector mi, vector ma, vector v2, float nomonst, entity forent, float lag, float wz); +void traceline_antilag_force (entity source, vector v1, vector v2, float nomonst, entity forent, float lag); +void traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag); +void tracebox_antilag (entity source, vector v1, vector mi, vector ma, vector v2, float nomonst, entity forent, float lag); +void WarpZone_traceline_antilag_force (entity source, vector v1, vector v2, float nomonst, entity forent, float lag); +void WarpZone_traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag); +void WarpZone_tracebox_antilag (entity source, vector v1, vector mi, vector ma, vector v2, float nomonst, entity forent, float lag);