From: terencehill Date: Sat, 12 Aug 2023 21:42:19 +0000 (+0200) Subject: Fix #2859 "Explosions do not go through warpzones" X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=16e82758c11a398763372e8e6b771b06e4960384;p=xonotic%2Fxonotic-data.pk3dir.git Fix #2859 "Explosions do not go through warpzones" --- diff --git a/qcsrc/server/damage.qc b/qcsrc/server/damage.qc index 44bce18a8..eb70572c0 100644 --- a/qcsrc/server/damage.qc +++ b/qcsrc/server/damage.qc @@ -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