Fixed Ice Claspers not TPing if far enough.
This commit is contained in:
1 parent
efaf4a7355
commit
62f39c1226
1 file changed
+6
-6
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user