Merge remote-tracking branch 'upstream/main' into pulls/small-crouch-hitbox-fix

This commit is contained in:
KirbyKidJ
2025-10-09 08:23:38 -07:00
130 changed files with 13963 additions and 12828 deletions

View File

@@ -21,7 +21,11 @@ func rise_tween() -> void:
var dir = sign(target_player.global_position.x - global_position.x)
var target_position := Vector2(32 * dir, -32)
var final_position = global_position + target_position
final_position.y = clamp(final_position.y, -176, 64)
var top_point = -176
if Global.current_level != null:
top_point = Global.current_level.vertical_height + 32
final_position.y = clamp(final_position.y, top_point, 64)
tween.tween_property(self, "global_position", final_position, 0.75)
await tween.finished
falling = true

View File

@@ -82,7 +82,7 @@ func throw_spiny() -> void:
node.velocity = Vector2(0, -150)
if fixed_throw:
node.velocity.x = 50 * (sign(player.global_position.x - global_position.x))
node.set("direction", sign(node.velocity.x))
node.set("direction", sign(node.velocity.x))
add_sibling(node)
if Settings.file.audio.extra_sfx == 1:
AudioManager.play_sfx("lakitu_throw", global_position)

View File

@@ -1,4 +1,4 @@
@icon("res://Assets/Sprites/Editor/Enemy.png")
@icon("res://Assets/Sprites/Editor/Enemy.svg")
class_name Enemy
extends CharacterBody2D

View File

@@ -57,6 +57,7 @@ func run_door_check() -> void:
if same_scene_exiting_door != null:
if same_scene_exiting_door != self and exiting_door_id == door_id:
door_found = true
get_tree().call_group("CameraLimits", "return_camera_to_normal")
for i in get_tree().get_nodes_in_group("Players"):
player_exit(i)
return

View File

@@ -1,5 +1,5 @@
@tool
@icon("res://Assets/Sprites/Editor/Pipe.png")
@icon("res://Assets/Sprites/Editor/Pipe.svg")
class_name PipeArea
extends Node2D

View File

@@ -605,7 +605,7 @@ func death_load() -> void:
Global.death_load = true
# Handle lives decrement for CAMPAIGN and MARATHON
if [Global.GameMode.CAMPAIGN, Global.GameMode.MARATHON, Global.GameMode.LEVEL_EDITOR, Global.GameMode.CUSTOM_LEVEL].has(Global.current_game_mode):
if [Global.GameMode.CAMPAIGN, Global.GameMode.MARATHON].has(Global.current_game_mode):
if Settings.file.difficulty.inf_lives == 0:
Global.lives -= 1
@@ -617,6 +617,7 @@ func death_load() -> void:
Global.GameMode.LEVEL_EDITOR: func():
owner.stop_testing(),
Global.GameMode.CHALLENGE: func():
Global.transition_to_scene("res://Scenes/Levels/ChallengeMiss.tscn"),
@@ -643,10 +644,10 @@ func death_load() -> void:
# Determine which action to take
if death_actions.has(Global.current_game_mode):
death_actions[Global.current_game_mode].call()
elif Global.time <= 0:
death_actions["time_up"].call()
elif Global.lives <= 0 and Settings.file.difficulty.inf_lives == 0:
death_actions["game_over"].call()
elif Global.time <= 0:
death_actions["time_up"].call()
else:
death_actions["default_reload"].call()
@@ -682,11 +683,13 @@ func get_power_up(power_name := "") -> void:
await power_up_animation(power_name)
else:
return
check_for_block()
power_state = new_power_state
Global.player_power_states[player_id] = str(power_state.get_index())
handle_power_up_states(0)
can_hurt = true
refresh_hitbox()
await get_tree().physics_frame
check_for_block()
func check_for_block() -> void:
if test_move(global_transform, (Vector2.UP * gravity_vector) * 4):