Mechworm oversight fix

This commit is contained in:
Dominic committed 2020-10-16 17:17:22 -05:00
1 parent cc963a6c3e
commit ad3afe5167
1 file changed
+8
+8
View File
@@ -124,6 +124,7 @@ namespace CalamityMod.Projectiles.Summon
// Locate the head segment by looping through all worm segments until it is found.
int tries = 0;
while (head.type != ModContent.ProjectileType<MechwormHead>())
{
int aheadUUID = Projectile.GetByUUID(head.owner, head.ai[0]);
@@ -134,6 +135,13 @@ namespace CalamityMod.Projectiles.Summon
}
head = Main.projectile[aheadUUID];
if (tries >= Main.maxProjectiles)
{
projectile.Kill();
return;
}
tries++;
}
MechwormHead headModProj = head.modProjectile as MechwormHead;