Fix for the previous commit lol
This commit is contained in:
1 parent
afec972b81
commit
b141d7e88f
1 file changed
+8
-8
@@ -17,6 +17,14 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
{
|
||||
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
|
||||
|
||||
// Get a target
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
npc.TargetClosest();
|
||||
|
||||
// Despawn safety, make sure to target another player if the current player target is too far away
|
||||
if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
|
||||
npc.TargetClosest();
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
|
||||
@@ -58,14 +66,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
bool phase4 = lifeRatio < 0.25f;
|
||||
bool phase5 = lifeRatio < 0.1f;
|
||||
|
||||
// Get a target
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
npc.TargetClosest();
|
||||
|
||||
// Despawn safety, make sure to target another player if the current player target is too far away
|
||||
if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
|
||||
npc.TargetClosest();
|
||||
|
||||
// Despawn
|
||||
float num616 = Vector2.Distance(npc.Center, Main.player[npc.target].Center);
|
||||
if (npc.ai[0] != 5f)
|
||||
|
||||
Reference in new issue
Block a user