]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix #2859 "Explosions do not go through warpzones"
authorterencehill <piuntn@gmail.com>
Sat, 12 Aug 2023 21:42:19 +0000 (23:42 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 12 Aug 2023 21:42:19 +0000 (23:42 +0200)
qcsrc/server/damage.qc

index 44bce18a823533eeaf494f6b0dc654d5903bec68..eb70572c02322674308a557c1d484c6a14045b85 100644 (file)
@@ -922,10 +922,9 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in
                        // measure distance from nearest point on target (not origin)
                        // to nearest point on inflictor (not origin)
                        vector nearest = targ.WarpZone_findradius_nearest;
+                       vector inflictororigin_wz = targ.WarpZone_findradius_nearest + targ.WarpZone_findradius_dist;
                        vector inflictornearest = NearestPointOnBoundingBox(
-                               inflictororigin - (inflictor.maxs - inflictor.mins) * 0.5,
-                               inflictororigin + (inflictor.maxs - inflictor.mins) * 0.5,
-                               nearest);
+                               inflictororigin_wz + inflictor.mins, inflictororigin_wz + inflictor.maxs, nearest);
                        vector diff = inflictornearest - nearest;
 
                        // round up a little on the damage to ensure full damage on impacts