From: Rudolf Polzer Date: Mon, 22 Aug 2011 13:31:49 +0000 (+0200) Subject: do what the original fix was SUPPOSED to be (prevents players from hiding from rocket... X-Git-Tag: xonotic-v0.5.0~88 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c393f89e1bf8b8d025b6a7aadc45c07c9c1c44fd;p=xonotic%2Fxonotic-data.pk3dir.git do what the original fix was SUPPOSED to be (prevents players from hiding from rockets using a warpzone) --- diff --git a/qcsrc/warpzonelib/server.qc b/qcsrc/warpzonelib/server.qc index ac4a603fe..63e3e712a 100644 --- a/qcsrc/warpzonelib/server.qc +++ b/qcsrc/warpzonelib/server.qc @@ -166,8 +166,20 @@ void WarpZone_Touch (void) return; float f; + // number of frames we need to go back: + // dist = 16*sqrt(2) qu + // dist ~ 24 qu + // 24 qu = v*t + // 24 qu = v*frametime*n + // n = 24 qu/(v*frametime) + // for clients go only one frame though, may be too irritating otherwise + // but max 0.25 sec = 0.25/frametime frames + // 24/(0.25/frametime) + // 96*frametime + float d; + d = 24 + max(vlen(other.mins), vlen(other.maxs)); if(clienttype(other) == CLIENTTYPE_NOTACLIENT) - f = min(-1, -64 / vlen(other.velocity)); + f = -d / bound(frametime * d * 1, frametime * vlen(other.velocity), d); else f = -1; if(WarpZone_Teleport(self, other, f, 0))