No Hitting NPCs

This commit is contained in:
Xyk authored and Cameron Ewell committed 2026-05-22 00:47:49 -04:00
1 parent a4fd016e40
commit 8cdcd2755a
1 file changed
+1 -1
+1 -1
View File
@@ -496,7 +496,7 @@ namespace CalamityMod.Projectiles.Rogue
for (int index = 0; index < Main.npc.Length; index++)
{
NPC target = Main.npc[index];
if (!target.dontTakeDamage && target.active && target.life > 0)
if (!target.dontTakeDamage && target.active && target.life > 0 && !target.townNPC)
{
float _ = float.NaN;
bool collides = Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), startPoint, endPoint, 10 * Projectile.scale, ref _);