mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-23 16:00:54 +00:00
Implement WaterCrouchMove and WingCrouchMove (and fix an incorrect default value on small crouch height) (#643)
* Add WaterCrouchMove and WingCrouchMove states * Implement WaterCrouchMove and WingCrouchMove * Quick patch for incorrect crouch height im adding this to this branch for this since its literally just a number change lol
This commit is contained in:
@@ -161,6 +161,8 @@ const ANIMATION_FALLBACKS := {
|
||||
"CrouchJump": "Crouch",
|
||||
"CrouchBump": "Bump",
|
||||
"CrouchMove": "Crouch",
|
||||
"WaterCrouchMove": "CrouchMove",
|
||||
"WingCrouchMove": "WaterCrouchMove",
|
||||
"IdleAttack": "MoveAttack",
|
||||
"CrouchAttack": "IdleAttack",
|
||||
"MoveAttack": "Attack",
|
||||
@@ -247,7 +249,7 @@ func apply_character_physics(apply: bool) -> void:
|
||||
|
||||
for i in get_tree().get_nodes_in_group("SmallCollisions"):
|
||||
var hitbox_scale = json.get("small_hitbox_scale", [1, 1]) if apply else [1, 1]
|
||||
i.hitbox = Vector3(hitbox_scale[0], hitbox_scale[1] if i.get_meta("scalable", true) else 1, json.get("small_crouch_scale", 0.75) if apply else 0.5)
|
||||
i.hitbox = Vector3(hitbox_scale[0], hitbox_scale[1] if i.get_meta("scalable", true) else 1, json.get("small_crouch_scale", 0.75) if apply else 0.75)
|
||||
i._physics_process(0)
|
||||
for i in get_tree().get_nodes_in_group("BigCollisions"):
|
||||
var hitbox_scale = json.get("big_hitbox_scale", [1, 1]) if apply else [1, 1]
|
||||
|
||||
Reference in New Issue
Block a user