From d8678a11fe6baed41cd63396d2ce50736752ac1a Mon Sep 17 00:00:00 2001 From: Thomas Lavocat Date: Sun, 28 May 2023 22:04:44 +0200 Subject: [PATCH] princesse/wall_hug: ne pas huger le plafond MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La princesse avait tendance à s'accrocher au plafond pour quechi. Correction du bug zoubi --- princesse.gd | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/princesse.gd b/princesse.gd index 5ae324d..1c83a4e 100644 --- a/princesse.gd +++ b/princesse.gd @@ -461,7 +461,6 @@ func read_input() -> void: (pressing_wall_right and direction == 1) ) ) - else: grab_wall = false @@ -526,12 +525,16 @@ func compute_state() -> void: coyote_grab.remove_at(0) # gestion de l'état de la pression au mur - pressing_wall_left = (not is_on_floor() and not collide_ground_far_detect) and ( + pressing_wall_left = ( + not is_on_floor() and not collide_ground_far_detect and not is_on_ceiling_only() + ) and ( wall_detect_left.is_colliding() or wall_detect_left2.is_colliding() or wall_detect_left3.is_colliding() ) - pressing_wall_right = (not is_on_floor() and not collide_ground_far_detect) and ( + pressing_wall_right = ( + not is_on_floor() and not collide_ground_far_detect and not is_on_ceiling_only() + ) and ( wall_detect_right.is_colliding() or wall_detect_right2.is_colliding() or wall_detect_right3.is_colliding()