diff --git a/scripts/components/plants/ThreepeaterShooter.cs b/scripts/components/plants/ThreepeaterShooter.cs index 5da8317..61773ab 100644 --- a/scripts/components/plants/ThreepeaterShooter.cs +++ b/scripts/components/plants/ThreepeaterShooter.cs @@ -9,7 +9,7 @@ public partial class ThreepeaterShooter : Shooter { for(int i = -1; i <= 1; i++) { - if ((int)GetParent().GlobalPosition.Y/Utility.TileHeight+i < 0 || (int)GetParent().GlobalPosition.Y/Utility.TileHeight+i > Utility.LineCount) + if (GetParent().GlobalPosition.Y+i*Utility.TileHeight >= Utility.RightFieldBoundary.Y || GetParent().GlobalPosition.Y+i*Utility.TileHeight <= Utility.LeftFieldBoundary.Y) continue; var instance = _projectile.Instantiate();