From 3f1cdc9081eea5db928ad80526a5dc7b0f42a2a1 Mon Sep 17 00:00:00 2001 From: tommy-l-ngo Date: Mon, 1 Nov 2021 20:44:44 -0500 Subject: [PATCH] Bug Fix: Board snap bordering fix --- godot_ship/script/game/moveShip.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/godot_ship/script/game/moveShip.gd b/godot_ship/script/game/moveShip.gd index 8450222..946c3ff 100644 --- a/godot_ship/script/game/moveShip.gd +++ b/godot_ship/script/game/moveShip.gd @@ -25,7 +25,7 @@ func _input(event): if held and not event.pressed: held = false; - if (position.x > 17.4 and position.x < 337.5) and (position.y > 20.2 and position.y < 335.5): + if (position.x > 17.4 and position.x < 335.5) and (position.y > 20.2 and position.y < 335.5): position = position.snapped(Vector2(32, 32)) + Vector2(4, 4) else: if originalPos != null: @@ -115,7 +115,7 @@ func _input(event): rotate(PI/2) vertical = true - if(position.x > 17.4 and position.x < 337.5) and (position.y > 20.2 and position.y < 335.5): + if(position.x > 17.4 and position.x < 335.5) and (position.y > 20.2 and position.y < 335.5): # 2-Ship if (get_parent().get_node("2Ship").rotation_degrees == 0): if (get_parent().get_node("2Ship").position.y > 308):