]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
ntilag: fix division by zero after antilag reset
authorRudolf Polzer <divverent@alientrap.org>
Sun, 1 Jan 2012 15:13:28 +0000 (16:13 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 1 Jan 2012 15:13:28 +0000 (16:13 +0100)
qcsrc/server/antilag.qc

index 3db0540fc83f424f08d16340f80a18c52f0c6bf8..f8454256e4e95e00b03321d99dda5b3a438a3fa5 100644 (file)
@@ -119,8 +119,8 @@ void antilag_clear(entity e)
        antilag_restore(e);
        for(i = 0; i < ANTILAG_MAX_ORIGINS; ++i)
        {
-               e.(antilag_times[i]) = -2342;
+               e.(antilag_times[i]) = -2342 + i * 0.01;
                e.(antilag_origins[i]) = self.origin;
        }
-       e.antilag_index = 0;
+       e.antilag_index = ANTILAG_MAX_ORIGINS - 1; // next one is 0
 }