From 25759bc00457ca1e1b864f4701301fa84af27d3a Mon Sep 17 00:00:00 2001 From: NullBite Date: Fri, 25 Mar 2022 10:10:50 -0400 Subject: [PATCH] Reduce tail speed if out of water (e.g., flying) --- script.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script.lua b/script.lua index 2a5ba16..d896526 100644 --- a/script.lua +++ b/script.lua @@ -845,7 +845,9 @@ function animateTick() if aquaticTailVisible() then old_state.anim_cycle=anim_cycle local player_speed = math.sqrt(velocity.x^2 + velocity.y^2 + velocity.z^2) - anim_cycle=anim_cycle + (player_speed*5+0.75) + local animation=player.getAnimation() + local factor=(not player.isTouchingWater() and (animation=="FALL_FLYING" or animation=="SPIN_ATTACK")) and 0.5 or 5 + anim_cycle=anim_cycle + (player_speed*factor+0.75) -- bubble animation would go here but i don't have that (yet) end