From 58eae4a8f728379abf522ce4e4e71f8ae2fdfc78 Mon Sep 17 00:00:00 2001 From: pennyrigate Date: Fri, 24 Feb 2023 17:20:13 -0500 Subject: [PATCH] restart function only works if Game.can_pause == true (fixes #55) --- autoloads/game.gd | 2 +- maps/test_room.tscn | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/autoloads/game.gd b/autoloads/game.gd index 320a8a5..9b67987 100644 --- a/autoloads/game.gd +++ b/autoloads/game.gd @@ -168,7 +168,7 @@ func play_music(song): func _physics_process(delta): if Debug.entry == false: # restart level - if Input.is_action_just_pressed("restart"): + if Input.is_action_just_pressed("restart") && can_pause: call_deferred("restart_level") #CRT FILTER if Input.is_action_just_pressed("crt"): diff --git a/maps/test_room.tscn b/maps/test_room.tscn index e11ac03..fe80d03 100644 --- a/maps/test_room.tscn +++ b/maps/test_room.tscn @@ -192,7 +192,6 @@ position = Vector2( 48, 120 ) [node name="AnimatedSprite" parent="RollingFiend" index="0"] visible = false -frame = 0 [node name="SawTest2" type="AnimatedSprite" parent="RollingFiend"] material = SubResource( 4 )