Skip to content

Commit

Permalink
Merge pull request #3572 from CombatExtended-Continued/melee-wallfrag…
Browse files Browse the repository at this point in the history
…s-exclusion

Exclude melee from wall frags
  • Loading branch information
N7Huntsman authored Nov 30, 2024
2 parents 751fc83 + ed3b590 commit d40786c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ protected virtual IEnumerable<DamageInfo> DamageInfosToApply(LocalTargetInfo tar
damageInfo.SetWeaponBodyPartGroup(bodyPartGroupDef);
damageInfo.SetWeaponHediff(hediffDef);
damageInfo.SetAngle(direction);
damageInfo.SetTool(tool);
yield return damageInfo;
if (this.tool != null && this.tool.extraMeleeDamages != null)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/CombatExtended/Harmony/Harmony_DamageWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static bool Prefix(DamageWorker __instance, DamageInfo dinfo, Thing victi
{
return true;
}
if (victim.def.useHitPoints && dinfo.Def.harmsHealth && dinfo.Def != DamageDefOf.Mining)
if (victim.def.useHitPoints && dinfo.Def.harmsHealth && dinfo.tool == null && dinfo.Def != DamageDefOf.Mining)
{
if (victim.def.category == ThingCategory.Building)
{
Expand Down

0 comments on commit d40786c

Please sign in to comment.