Lab Turrets no longer target invisible players

This commit is contained in:
sunny-raindrops committed 2026-05-27 15:50:20 -07:00
1 parent 16a6018b74
commit f3f71f1b6c
7 files changed
+21 -21

No files matched your search

+3 -3
View File
@@ -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);
+3 -3
View File
@@ -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);
+3 -3
View File
@@ -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);
+3 -3
View File
@@ -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);
+3 -3
View File
@@ -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);
+3 -3
View File
@@ -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);
+3 -3
View File
@@ -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);