From: Martin Taibr Date: Thu, 29 Nov 2018 08:38:54 +0000 (+0100) Subject: deglob tracing again X-Git-Tag: xonotic-v0.8.5~1258^2~8 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=eb8bd20d5384af0cdde5674b10829a9a54486a88;p=xonotic%2Fxonotic-data.pk3dir.git deglob tracing again Merge branch 'master' into martin-t/globals --- eb8bd20d5384af0cdde5674b10829a9a54486a88 diff --cc qcsrc/server/weapons/tracing.qc index 1b816f304,dfa138972..56aa5abe4 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@@ -73,20 -74,22 +74,22 @@@ void W_SetupShot_Dir_ProjectileSize_Ran vector md = ent.(weaponentity).movedir; vector vecs = ((md.x > 0) ? md : '0 0 0'); - vector dv = forward * vecs.x + right * -vecs.y + up * vecs.z; - w_shotorg = ent.origin + ent.view_ofs; + // TODO this is broken - see 637056bea7bf7f5c9c0fc6113e94731a2767476 for an attempted fix + // which fixes issue #1957 but causes #2129 - vector dv = v_right * -vecs.y + v_up * vecs.z; ++ vector dv = right * -vecs.y + up * vecs.z; + w_shotorg = ent.origin + ent.view_ofs + dv; // now move the shotorg forward as much as requested if possible if(antilag) { if(CS(ent).antilag_debug) - tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent, CS(ent).antilag_debug); - tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + v_forward * (vecs.x + nudge), MOVE_NORMAL, ent, CS(ent).antilag_debug); ++ tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + forward * (vecs.x + nudge), MOVE_NORMAL, ent, CS(ent).antilag_debug); else - tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent, ANTILAG_LATENCY(ent)); - tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + v_forward * (vecs.x + nudge), MOVE_NORMAL, ent, ANTILAG_LATENCY(ent)); ++ tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + forward * (vecs.x + nudge), MOVE_NORMAL, ent, ANTILAG_LATENCY(ent)); } else - tracebox(w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent); - w_shotorg = trace_endpos; - tracebox(w_shotorg, mi, ma, w_shotorg + v_forward * (vecs.x + nudge), MOVE_NORMAL, ent); - w_shotorg = trace_endpos - v_forward * nudge; ++ tracebox(w_shotorg, mi, ma, w_shotorg + forward * (vecs.x + nudge), MOVE_NORMAL, ent); ++ w_shotorg = trace_endpos - forward * nudge; // calculate the shotdir from the chosen shotorg if(W_DualWielding(ent)) w_shotdir = s_forward;