]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Perform an initial trace to the position of the gun, potential fix for rockets gettin...
authorMario <mario.mario@y7mail.com>
Fri, 6 Nov 2020 15:47:11 +0000 (15:47 +0000)
committerMario <mario.mario@y7mail.com>
Fri, 6 Nov 2020 15:47:11 +0000 (15:47 +0000)
.gitlab-ci.yml
qcsrc/server/weapons/tracing.qc

index 2f2fd4f2f5d9c43bf212ed09f420eb3178fec310..8c878258cd3172f5f9ce24f812e1e272731a17f9 100644 (file)
@@ -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 '^:'
index 4db498b4a0be5fafbca77a6e692e194f294ecd44..b345b0984018ec8ccd77df2d03df5396f058630f 100644 (file)
@@ -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)