Changes input to not allow instant death by reversing direction (begrudgingly by popular request)

master
TechieDamien 2025-08-02 10:49:02 +01:00
parent 23b73dd5f6
commit 3b2c5c2103
Signed by: TechieDamien
GPG Key ID: 2ACE3574E164B780
1 changed files with 1 additions and 1 deletions

View File

@ -398,7 +398,7 @@ func _unhandled_input(event: InputEvent) -> void:
# Change direction if we are the head # Change direction if we are the head
if event is InputEventKey and part_type == PartTypes.HEAD: if event is InputEventKey and part_type == PartTypes.HEAD:
for dir in inputs.keys(): for dir in inputs.keys():
if event.is_action_pressed(dir): if event.is_action_pressed(dir) and current_direction != -inputs[dir]:
current_direction = inputs[dir] current_direction = inputs[dir]