mirror of
				https://github.com/JohnBreaux/Boat-Battle.git
				synced 2025-02-04 12:28:35 +00:00 
			
		
		
		
	Fixed bug
Bug fixed: - moving the ship piece in place crashes game and triggers debugging
This commit is contained in:
		| @@ -1,6 +1,5 @@ | ||||
| extends RigidBody2D | ||||
|  | ||||
|  | ||||
| # Declare member variables here. Examples: | ||||
| # var a = 2 | ||||
| # var b = "text" | ||||
| @@ -26,7 +25,8 @@ func _input(event): | ||||
| 			if (position.x > 17.4 and position.x < 337.5) and (position.y > 20.2 and position.y < 335.5): | ||||
| 				position = position.snapped(Vector2(32, 32)) + Vector2(4, 4) | ||||
| 			else: | ||||
| 				position = originalPos | ||||
| 				if originalPos != null: | ||||
| 					position = originalPos | ||||
| 			 | ||||
| 	if event is InputEventMouseMotion and held: | ||||
| 		if snapOriginalPos == false: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user