A few more contact damage fixes.
This commit is contained in:
1 parent
7e36160fb4
commit
cfbd1012d9
2 files changed
+4
-3
No files matched your search
@@ -62,7 +62,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
NPC.DeathSound = Main.zenithWorld ? SoundID.NPCDeath14 : BreakSound;
|
||||
|
||||
NPC.Opacity += 0.01f;
|
||||
if (NPC.Opacity > 1f)
|
||||
if (NPC.Opacity >= 1f)
|
||||
{
|
||||
NPC.damage = NPC.defDamage;
|
||||
NPC.Opacity = 1f;
|
||||
@@ -86,6 +86,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
NPC.position.Y = NPC.position.Y - (NPC.height / 2);
|
||||
return;
|
||||
}
|
||||
|
||||
NPC.life = 0;
|
||||
NPC.HitEffect();
|
||||
NPC.active = false;
|
||||
@@ -111,7 +112,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
if (hitboxBotRight < minDist)
|
||||
minDist = hitboxBotRight;
|
||||
|
||||
return minDist <= (100f * NPC.scale) && NPC.Opacity == 1f;
|
||||
return minDist <= (100f * NPC.scale) && NPC.Opacity >= 1f;
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
NPC.netUpdate = true;
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot) => NPC.ai[1] == 0f;
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot) => NPC.ai[1] == 0f && NPC.alpha <= 100;
|
||||
|
||||
public override Color? GetAlpha(Color drawColor) => NPC.ai[1] == 1f ? Color.Transparent : new Color(200, 200, 200, drawColor.A) * NPC.Opacity;
|
||||
|
||||
|
||||
Reference in new issue
Block a user