From: terencehill Date: Sun, 14 Jul 2024 09:37:38 +0000 (+0200) Subject: Fix arc beam not dealing any damage when a player hits theirselves through a warpzone X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=aadadc1b83f8122ecbf8477c7e41c810f15c17d4;p=xonotic%2Fxonotic-data.pk3dir.git Fix arc beam not dealing any damage when a player hits theirselves through a warpzone --- diff --git a/qcsrc/common/weapons/weapon/arc.qc b/qcsrc/common/weapons/weapon/arc.qc index d12310c18..227100ed4 100644 --- a/qcsrc/common/weapons/weapon/arc.qc +++ b/qcsrc/common/weapons/weapon/arc.qc @@ -386,7 +386,7 @@ void W_Arc_Beam_Think(entity this) last_origin, new_origin, MOVE_NORMAL, - own, + NULL, ANTILAG_LATENCY(own) ); @@ -399,11 +399,11 @@ void W_Arc_Beam_Think(entity this) beam_endpos = WarpZone_TransformOrigin(WarpZone_trace_transform, beam_endpos); new_dir = WarpZone_TransformVelocity(WarpZone_trace_transform, new_dir); + if(trace_fraction == 1) + continue; + if(!trace_ent) { - if(trace_fraction == 1) - continue; - // we collided with geometry new_beam_type = ARC_BT_WALL; break; @@ -411,7 +411,7 @@ void W_Arc_Beam_Think(entity this) // we collided with an entity bool is_player = (IS_PLAYER(trace_ent) || trace_ent.classname == "body" || IS_MONSTER(trace_ent)); - if(SAME_TEAM(own, trace_ent)) + if(trace_ent != own && SAME_TEAM(own, trace_ent)) { float roothealth = ((burst) ? WEP_CVAR(arc, burst_healing_hps) : WEP_CVAR(arc, beam_healing_hps)); float rootarmor = ((burst) ? WEP_CVAR(arc, burst_healing_aps) : WEP_CVAR(arc, beam_healing_aps));