Quick fixes for optional animations (#612)

* Quick fix for flipped Jump/RunJump anims

accidentally used the condition the wrong way, my bad LOL

* >= moment

so thats why it was playing the fall animation for a single frame

* Reverted attempted fixes accidentally left in for CrouchBump
This commit is contained in:
SkyanUltra
2025-10-17 08:56:12 -04:00
committed by GitHub
parent a0521becb4
commit ed297891fd
2 changed files with 13 additions and 9 deletions

View File

@@ -159,7 +159,7 @@ const ANIMATION_FALLBACKS := {
"WingCrouch": "WaterCrouch",
"CrouchFall": "Crouch",
"CrouchJump": "Crouch",
"CrouchBump": "Crouch",
"CrouchBump": "Bump",
"CrouchMove": "Crouch",
"IdleAttack": "MoveAttack",
"CrouchAttack": "IdleAttack",
@@ -685,6 +685,10 @@ func set_power_state_frame() -> void:
$ResourceSetterNew.update_resource()
if %Sprite.sprite_frames != null:
can_pose = %Sprite.sprite_frames.has_animation("PoseDoor")
can_bump_jump = %Sprite.sprite_frames.has_animation("JumpBump")
can_bump_crouch = %Sprite.sprite_frames.has_animation("CrouchBump")
can_bump_swim = %Sprite.sprite_frames.has_animation("SwimBump")
can_bump_fly = %Sprite.sprite_frames.has_animation("FlyBump")
can_kick_anim = %Sprite.sprite_frames.has_animation("Kick")
func get_power_up(power_name := "") -> void:

View File

@@ -212,10 +212,10 @@ func get_animation_name() -> String:
if player.kicking and player.can_kick_anim:
return "Kick"
if player.crouching and not wall_pushing:
if player.bumping:
if player.bumping and player.can_bump_crouch:
return "CrouchBump"
elif player.is_on_floor() == false:
if player.velocity.y > 0:
if player.velocity.y >= 0:
return "CrouchFall"
elif player.velocity.y < 0:
return "CrouchJump"
@@ -275,23 +275,23 @@ func get_animation_name() -> String:
if player.has_jumped:
if player.bumping and player.can_bump_jump:
if abs(player.velocity_x_jump_stored) < player.RUN_SPEED - 10:
return "RunJumpBump"
else:
return "JumpBump"
else:
return "RunJumpBump"
elif player.velocity.y < 0:
if player.is_invincible:
return "StarJump"
elif abs(player.velocity_x_jump_stored) < player.RUN_SPEED - 10:
return "RunJump"
else:
return "Jump"
else:
return "RunJump"
else:
if player.is_invincible:
return "StarFall"
elif abs(player.velocity_x_jump_stored) < player.RUN_SPEED - 10:
return "RunJumpFall"
else:
return "JumpFall"
else:
return "RunJumpFall"
else:
# guzlad: Fixes characters with fall anims not playing them, but also prevents old characters without that anim not being accurate
if !player.sprite.sprite_frames.has_animation("Fall"):