From: Mario Date: Fri, 6 Nov 2020 15:47:11 +0000 (+0000) Subject: Perform an initial trace to the position of the gun, potential fix for rockets gettin... X-Git-Tag: xonotic-v0.8.5~687^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=349c2b7ab74dd4704b9ec6bef322447fdc0efed9;p=xonotic%2Fxonotic-data.pk3dir.git Perform an initial trace to the position of the gun, potential fix for rockets getting stuck in walls --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2f2fd4f2f..8c878258c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,7 +29,7 @@ test_sv_game: - wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints - wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache - make - - EXPECT=040aeef53953a85c5891c0c39cf9860f + - EXPECT=35117dbed178a88ab65576740023dc4b - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg | tee /dev/stderr | grep '^:' diff --git a/qcsrc/server/weapons/tracing.qc b/qcsrc/server/weapons/tracing.qc index 4db498b4a..b345b0984 100644 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@ -72,10 +72,18 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, .entity weaponentity, vect vector md = ent.(weaponentity).movedir; vector vecs = ((md.x > 0) ? md : '0 0 0'); - // TODO this is broken - see 637056bea7bf7f5c9c0fc6113e94731a2767476 for an attempted fix - // which fixes issue #1957 but causes #2129 vector dv = right * -vecs.y + up * vecs.z; - w_shotorg = ent.origin + ent.view_ofs + dv; + w_shotorg = ent.origin + ent.view_ofs; + if(antilag) + { + if(CS(ent).antilag_debug) + tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent, CS(ent).antilag_debug); + else + tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent, ANTILAG_LATENCY(ent)); + } + else + tracebox(w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent); + w_shotorg = trace_endpos; // now move the shotorg forward as much as requested if possible if(antilag)