fix
This commit is contained in:
1 parent
fce16b6124
commit
59ca470898
1 file changed
+5
-4
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user