From 07e68d7bf7aeca295e0aa5dfeaf67927ea43be4a Mon Sep 17 00:00:00 2001 From: SkyanUltra Date: Mon, 17 Nov 2025 21:24:19 -0500 Subject: [PATCH] Fixed sideways pipe hitbox collision This fixes a bug where players would clip the top edge of a sideways pipe's hitbox and get counted as being on the floor despite being above the pipe, thus allowing them to get warped into the pipe from there. --- Scripts/Classes/Entities/PipeArea.gd | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Scripts/Classes/Entities/PipeArea.gd b/Scripts/Classes/Entities/PipeArea.gd index bcac7209..309292a4 100644 --- a/Scripts/Classes/Entities/PipeArea.gd +++ b/Scripts/Classes/Entities/PipeArea.gd @@ -43,10 +43,13 @@ func run_pipe_check() -> void: exit_pipe() func _physics_process(_delta: float) -> void: + # SkyanUltra: Adjusted logic to offset pipe hitbox rather than stretching it, + # as it allowed characters to clip the edge of the pipe and get counted as + # grounded, getting warped into pipes from above. if enter_direction >= 2: - $Hitbox.scale.y = 8 + $Hitbox.position.y = 14 else: - $Hitbox.scale.y = 1 + $Hitbox.position.y = 0 if Engine.is_editor_hint() == false: in_game() @@ -111,8 +114,7 @@ func in_game() -> void: func run_player_check(player: Player) -> void: # guzlad: Added support for characters with a hitbox height below 1.0 to enter pipes underwater - print(player.is_actually_on_floor()) - if Global.player_action_pressed(get_input_direction(enter_direction), player.player_id) and (player.is_on_floor() or enter_direction == 1): + if Global.player_action_pressed(get_input_direction(enter_direction), player.player_id) and (player.is_actually_on_floor() or enter_direction == 1): can_enter = false pipe_entered.emit() DiscoLevel.can_meter_tick = false