From 0ead282209d1d601151e8dae0c07ab527c18521c Mon Sep 17 00:00:00 2001 From: Rendo Date: Tue, 1 Jul 2025 21:07:21 +0500 Subject: [PATCH] fixed threepeater shooting wrong lane --- scripts/components/plants/ThreepeaterShooter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();