Reduce tail speed if out of water (e.g., flying)
This commit is contained in:
parent
4445c2e370
commit
25759bc004
@ -845,7 +845,9 @@ function animateTick()
|
|||||||
if aquaticTailVisible() then
|
if aquaticTailVisible() then
|
||||||
old_state.anim_cycle=anim_cycle
|
old_state.anim_cycle=anim_cycle
|
||||||
local player_speed = math.sqrt(velocity.x^2 + velocity.y^2 + velocity.z^2)
|
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)
|
-- bubble animation would go here but i don't have that (yet)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user