From: Mario Date: Tue, 26 Jun 2018 15:12:01 +0000 (+1000) Subject: Fix the source entity of the shotgun melee, fixes inability to activate buttons X-Git-Tag: xonotic-v0.8.5~1974 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=984c761f3aa5011ff2e5c69ad6a03df051dad93e;p=xonotic%2Fxonotic-data.pk3dir.git Fix the source entity of the shotgun melee, fixes inability to activate buttons --- diff --git a/qcsrc/common/weapons/weapon/shotgun.qc b/qcsrc/common/weapons/weapon/shotgun.qc index 057ef3f03..4acceed71 100644 --- a/qcsrc/common/weapons/weapon/shotgun.qc +++ b/qcsrc/common/weapons/weapon/shotgun.qc @@ -69,7 +69,7 @@ void W_Shotgun_Melee_Think(entity this) + (v_up * swing_factor * WEP_CVAR_SEC(shotgun, melee_swing_up)) + (v_right * swing_factor * WEP_CVAR_SEC(shotgun, melee_swing_side))); - WarpZone_traceline_antilag(this, this.realowner.origin + this.realowner.view_ofs, targpos, false, this.realowner, ((IS_CLIENT(this.realowner)) ? ANTILAG_LATENCY(this.realowner) : 0)); + WarpZone_traceline_antilag(this.realowner, this.realowner.origin + this.realowner.view_ofs, targpos, false, this.realowner, ((IS_CLIENT(this.realowner)) ? ANTILAG_LATENCY(this.realowner) : 0)); // draw lightning beams for debugging //te_lightning2(NULL, targpos, this.realowner.origin + this.realowner.view_ofs + v_forward * 5 - v_up * 5); @@ -78,7 +78,7 @@ void W_Shotgun_Melee_Think(entity this) is_player = (IS_PLAYER(trace_ent) || trace_ent.classname == "body" || IS_MONSTER(trace_ent)); if((trace_fraction < 1) // if trace is good, apply the damage and remove this - && (trace_ent.takedamage == DAMAGE_AIM) + && (trace_ent.takedamage != DAMAGE_NO) && (trace_ent != this.swing_alreadyhit) && (is_player || WEP_CVAR_SEC(shotgun, melee_nonplayerdamage))) {