]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
prevents rockets from "zapping back"
authorRudolf Polzer <divverent@xonotic.org>
Tue, 28 Jun 2011 05:45:01 +0000 (07:45 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Tue, 28 Jun 2011 05:45:01 +0000 (07:45 +0200)
qcsrc/warpzonelib/server.qc

index ca911d7ce94500c098d552e615d0e7807eb4fe5c..2bcb579ccf0cdffc2d8bb8e4cd2cd4fc841379b0 100644 (file)
@@ -165,7 +165,12 @@ void WarpZone_Touch (void)
        if(WarpZone_PlaneDist(self, other.origin + other.view_ofs) >= 0) // wrong side of the trigger_warpzone (don't teleport yet)
                return;
 
-       if(WarpZone_Teleport(self, other, -1000, 0))
+       float f;
+       if(clienttype(self) == CLIENTTYPE_NOTACLIENT)
+               f = min(-1, -64 / vlen(self.velocity));
+       else
+               f = -1;
+       if(WarpZone_Teleport(self, other, f, 0))
        {
                string save1, save2;
                activator = other;