From: Rudolf Polzer Date: Tue, 28 Jun 2011 05:45:01 +0000 (+0200) Subject: prevents rockets from "zapping back" X-Git-Tag: xonotic-v0.5.0~159^2~15^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=36d6a302e3fd9d5c16d9c82effb048ef5fe1a9ae;p=xonotic%2Fxonotic-data.pk3dir.git prevents rockets from "zapping back" --- diff --git a/qcsrc/warpzonelib/server.qc b/qcsrc/warpzonelib/server.qc index ca911d7ce..2bcb579cc 100644 --- a/qcsrc/warpzonelib/server.qc +++ b/qcsrc/warpzonelib/server.qc @@ -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;