fixed lakitu throwing enemies causing their direction to be 0

This commit is contained in:
JHDev2006
2025-10-04 11:04:05 +01:00
parent d8003af13d
commit ca050380a2

View File

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