diff --git a/TileEntities/TEHostileFireTurret.cs b/TileEntities/TEHostileFireTurret.cs index 33ae21e7c2..18813caf5c 100644 --- a/TileEntities/TEHostileFireTurret.cs +++ b/TileEntities/TEHostileFireTurret.cs @@ -66,8 +66,8 @@ namespace CalamityMod.TileEntities { Player p = Main.player[PlayerTargetIndex]; - // If they don't exist, or are dead, then unmark them as a target and search for a new one. - if (!p.active || p.dead) + // If they don't exist, are dead, or are using an invis pot then unmark them as a target and search for a new one. + if (!p.active || p.dead || p.invis) indexToSet = -1; else { @@ -87,7 +87,7 @@ namespace CalamityMod.TileEntities foreach (Player p in Main.ActivePlayers) { - if (p.dead) + if (p.dead || p.invis) continue; float distSQ = p.DistanceSQ(targetingCenter); diff --git a/TileEntities/TEHostileIceTurret.cs b/TileEntities/TEHostileIceTurret.cs index d1ebcd8a6d..64fbd80707 100644 --- a/TileEntities/TEHostileIceTurret.cs +++ b/TileEntities/TEHostileIceTurret.cs @@ -66,8 +66,8 @@ namespace CalamityMod.TileEntities { Player p = Main.player[PlayerTargetIndex]; - // If they don't exist, or are dead, then unmark them as a target and search for a new one. - if (!p.active || p.dead) + // If they don't exist, are dead, or are using an invis pot then unmark them as a target and search for a new one. + if (!p.active || p.dead || p.invis) indexToSet = -1; else { @@ -87,7 +87,7 @@ namespace CalamityMod.TileEntities foreach (Player p in Main.ActivePlayers) { - if (p.dead) + if (p.dead || p.invis) continue; float distSQ = p.DistanceSQ(targetingCenter); diff --git a/TileEntities/TEHostileLabTurret.cs b/TileEntities/TEHostileLabTurret.cs index d74b9474a4..b1e8dbd9f4 100644 --- a/TileEntities/TEHostileLabTurret.cs +++ b/TileEntities/TEHostileLabTurret.cs @@ -66,8 +66,8 @@ namespace CalamityMod.TileEntities { Player p = Main.player[PlayerTargetIndex]; - // If they don't exist, or are dead, then unmark them as a target and search for a new one. - if (!p.active || p.dead) + // If they don't exist, are dead, or are using an invis pot then unmark them as a target and search for a new one. + if (!p.active || p.dead || p.invis) indexToSet = -1; else { @@ -87,7 +87,7 @@ namespace CalamityMod.TileEntities foreach (Player p in Main.ActivePlayers) { - if (p.dead) + if (p.dead || p.invis) continue; float distSQ = p.DistanceSQ(targetingCenter); diff --git a/TileEntities/TEHostileLaserTurret.cs b/TileEntities/TEHostileLaserTurret.cs index f34b471781..732524ac75 100644 --- a/TileEntities/TEHostileLaserTurret.cs +++ b/TileEntities/TEHostileLaserTurret.cs @@ -66,8 +66,8 @@ namespace CalamityMod.TileEntities { Player p = Main.player[PlayerTargetIndex]; - // If they don't exist, or are dead, then unmark them as a target and search for a new one. - if (!p.active || p.dead) + // If they don't exist, are dead, or are using an invis pot then unmark them as a target and search for a new one. + if (!p.active || p.dead || p.invis) indexToSet = -1; else { @@ -87,7 +87,7 @@ namespace CalamityMod.TileEntities foreach (Player p in Main.ActivePlayers) { - if (p.dead) + if (p.dead || p.invis) continue; float distSQ = p.DistanceSQ(targetingCenter); diff --git a/TileEntities/TEHostileOnyxTurret.cs b/TileEntities/TEHostileOnyxTurret.cs index 78a7fd87e9..a3467c083d 100644 --- a/TileEntities/TEHostileOnyxTurret.cs +++ b/TileEntities/TEHostileOnyxTurret.cs @@ -66,8 +66,8 @@ namespace CalamityMod.TileEntities { Player p = Main.player[PlayerTargetIndex]; - // If they don't exist, or are dead, then unmark them as a target and search for a new one. - if (!p.active || p.dead) + // If they don't exist, are dead, or are using an invis pot then unmark them as a target and search for a new one. + if (!p.active || p.dead || p.invis) indexToSet = -1; else { @@ -87,7 +87,7 @@ namespace CalamityMod.TileEntities foreach (Player p in Main.ActivePlayers) { - if (p.dead) + if (p.dead || p.invis) continue; float distSQ = p.DistanceSQ(targetingCenter); diff --git a/TileEntities/TEHostilePlagueTurret.cs b/TileEntities/TEHostilePlagueTurret.cs index 05cca39c47..0a74b7f4df 100644 --- a/TileEntities/TEHostilePlagueTurret.cs +++ b/TileEntities/TEHostilePlagueTurret.cs @@ -66,8 +66,8 @@ namespace CalamityMod.TileEntities { Player p = Main.player[PlayerTargetIndex]; - // If they don't exist, or are dead, then unmark them as a target and search for a new one. - if (!p.active || p.dead) + // If they don't exist, are dead, or are using an invis pot then unmark them as a target and search for a new one. + if (!p.active || p.dead || p.invis) indexToSet = -1; else { @@ -87,7 +87,7 @@ namespace CalamityMod.TileEntities foreach (Player p in Main.ActivePlayers) { - if (p.dead) + if (p.dead || p.invis) continue; float distSQ = p.DistanceSQ(targetingCenter); diff --git a/TileEntities/TEHostileWaterTurret.cs b/TileEntities/TEHostileWaterTurret.cs index 2b2f0a8923..ba768e59ff 100644 --- a/TileEntities/TEHostileWaterTurret.cs +++ b/TileEntities/TEHostileWaterTurret.cs @@ -66,8 +66,8 @@ namespace CalamityMod.TileEntities { Player p = Main.player[PlayerTargetIndex]; - // If they don't exist, or are dead, then unmark them as a target and search for a new one. - if (!p.active || p.dead) + // If they don't exist, are dead, or are using an invis pot then unmark them as a target and search for a new one. + if (!p.active || p.dead || p.invis) indexToSet = -1; else { @@ -87,7 +87,7 @@ namespace CalamityMod.TileEntities foreach (Player p in Main.ActivePlayers) { - if (p.dead) + if (p.dead || p.invis) continue; float distSQ = p.DistanceSQ(targetingCenter);