1 - Aquatic Scourge despawns if 500 tiles away, despawns if 250 tiles away if it's passive.

This commit is contained in:
Andrew Marheine committed 2020-11-20 14:03:33 -06:00
1 parent d55c0fe26c
commit cdffaf4abc
1 file changed
+2 -1
+2 -1
View File
@@ -333,7 +333,8 @@ namespace CalamityMod.NPCs
}
}
if (player.dead)
float maxDistance = calamityGlobalNPC.newAI[0] == 1f ? 8000f : 4000f;
if (player.dead || Vector2.Distance(npc.Center, player.Center) > maxDistance)
{
calamityGlobalNPC.newAI[1] = 1f;
npc.TargetClosest(false);