Eternity can now properly target WoF eyes

This commit is contained in:
DominicKarma42 committed 2020-06-29 22:22:22 -05:00
1 parent da1a99efd0
commit dccb73c91e
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Magic
projectile.ai[0]++;
if (projectile.ai[0] == 1f)
{
NPC target = projectile.Center.ClosestNPCAt(4400f, true, true);
NPC target = Main.MouseWorld.ClosestNPCAt(4400f, true, true);
if (target != null)
{
+3 -3
View File
@@ -382,8 +382,8 @@ namespace CalamityMod
bool bossFound = false;
for (int index = 0; index < Main.npc.Length; index++)
{
//if we've found a valid boss target, ignore ALL targets which aren't bosses.
if (bossFound && !Main.npc[index].boss)
// If we've found a valid boss target, ignore ALL targets which aren't bosses.
if (bossFound && !(Main.npc[index].boss || Main.npc[index].type == NPCID.WallofFleshEye))
continue;
if (Main.npc[index].CanBeChasedBy(null, false))
{
@@ -395,7 +395,7 @@ namespace CalamityMod
if (Vector2.Distance(origin, Main.npc[index].Center) < (distance + extraDistance) && canHit)
{
if (Main.npc[index].boss)
if (Main.npc[index].boss || Main.npc[index].type == NPCID.WallofFleshEye)
bossFound = true;
distance = Vector2.Distance(origin, Main.npc[index].Center);
closestTarget = Main.npc[index];