From: Rudolf Polzer Date: Sun, 1 Jan 2012 15:17:54 +0000 (+0100) Subject: antilag_takeback: better handling for the present X-Git-Tag: xonotic-v0.6.0~189^2~12 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=eafbf0840fc1757149e64541b0eb782cd1cb4c7d;p=xonotic%2Fxonotic-data.pk3dir.git antilag_takeback: better handling for the present --- diff --git a/qcsrc/server/antilag.qc b/qcsrc/server/antilag.qc index f8454256e..56176c1ae 100644 --- a/qcsrc/server/antilag.qc +++ b/qcsrc/server/antilag.qc @@ -66,9 +66,11 @@ vector antilag_takebackorigin(entity e, float t) i0 = antilag_find(e, t); if(i0 < 0) { - i0 = e.antilag_index - 1; - if(i0 < 0) - i0 = ANTILAG_MAX_ORIGINS - 1; + // IN THE PRESENT + if(e.antilag_takenback) + return e.antilag_saved_origin; + else + return e.origin; } i1 = i0 + 1; if(i1 >= ANTILAG_MAX_ORIGINS)