Fixed Ice Claspers not TPing if far enough.

This commit is contained in:
Memes committed 2024-01-24 17:05:35 +01:00
1 parent efaf4a7355
commit 62f39c1226
1 file changed
+6 -6
+6 -6
View File
@@ -77,17 +77,17 @@ namespace CalamityMod.Projectiles.Summon
public void FollowState()
{
// If the minion starts to get far, force the minion to go to you.
if (!Projectile.WithinRange(Owner.Center, AncientIceChunk.MaxDistanceFromOwner))
// Teleport to the owner if sufficiently far away.
if (!Projectile.WithinRange(Owner.Center, 1200f))
{
Projectile.velocity = (Projectile.velocity + Projectile.SafeDirectionTo(Owner.Center)) * 0.9f;
Projectile.Center = Owner.Center;
SyncVariables();
}
// Teleport to the owner if sufficiently far away.
else if (!Projectile.WithinRange(Owner.Center, 1200f))
// If the minion starts to get far, force the minion to go to you.
else if (!Projectile.WithinRange(Owner.Center, AncientIceChunk.MaxDistanceFromOwner))
{
Projectile.Center = Owner.Center;
Projectile.velocity = (Projectile.velocity + Projectile.SafeDirectionTo(Owner.Center)) * 0.9f;
SyncVariables();
}