From 59ca470898db78caa515305ab6f366be04011291 Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Fri, 19 Aug 2022 19:22:40 -0400 Subject: [PATCH] fix --- CalPlayer/CalamityPlayerDashEffects.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CalPlayer/CalamityPlayerDashEffects.cs b/CalPlayer/CalamityPlayerDashEffects.cs index 77cf37d054..54efc8ffdc 100644 --- a/CalPlayer/CalamityPlayerDashEffects.cs +++ b/CalPlayer/CalamityPlayerDashEffects.cs @@ -58,6 +58,11 @@ namespace CalamityMod.CalPlayer for (int i = 0; i < Main.maxNPCs; i++) { NPC n = Main.npc[i]; + + // Ignore critters with the Guide to Critter Companionship + if (Player.dontHurtCritters && NPCID.Sets.CountsAsCritter[n.type]) + continue; + if (n.active && !n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0) { if (hitArea.Intersects(n.getRect()) && (n.noTileCollide || Player.CanHit(n))) @@ -69,10 +74,6 @@ namespace CalamityMod.CalPlayer if (hitContext.Damage <= 0) continue; - // Ignore critters with the Guide to Critter Companionship - if (Player.dontHurtCritters && NPCID.Sets.CountsAsCritter[n.type]) - continue; - Player.ApplyDamageToNPC(n, hitContext.Damage, hitContext.KnockbackFactor, hitContext.HitDirection, hitContext.CriticalHit); if (n.Calamity().dashImmunityTime[Player.whoAmI] < 12) n.Calamity().dashImmunityTime[Player.whoAmI] = 12;