From 6899c1063c7ad0f4bad90ceecfd2cd7623b98f33 Mon Sep 17 00:00:00 2001 From: TechieDamien Date: Fri, 1 Aug 2025 11:52:48 +0100 Subject: [PATCH] Fixes bug where ouroboroses stop turning when you lose the game --- Scripts/ouroboros.gd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Scripts/ouroboros.gd b/Scripts/ouroboros.gd index fd0d340..f6f6050 100644 --- a/Scripts/ouroboros.gd +++ b/Scripts/ouroboros.gd @@ -2,8 +2,11 @@ extends Sprite2D const ROTATION_SPEED = 0.2 +var last_rotation_mult = 1 + func _process(delta: float) -> void: var head = get_tree().get_first_node_in_group("Head") if head is SnakePart: - rotate(delta * ROTATION_SPEED * (head.colour_index + 1)) modulate = head.COLOURS[head.colour_index] + last_rotation_mult = head.colour_index + 1 + rotate(delta * ROTATION_SPEED * last_rotation_mult)