]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
antilag_takeback: better handling for the present
authorRudolf Polzer <divverent@alientrap.org>
Sun, 1 Jan 2012 15:17:54 +0000 (16:17 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 1 Jan 2012 15:17:54 +0000 (16:17 +0100)
qcsrc/server/antilag.qc

index f8454256e4e95e00b03321d99dda5b3a438a3fa5..56176c1ae67083f2b416034bd78f83e62cff8fc9 100644 (file)
@@ -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)