1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2025-06-28 06:30:18 +02:00

use api functions for riding mob

This commit is contained in:
tenplus1
2023-10-13 08:31:55 +01:00
parent 71e620eb0f
commit 768ef84bd8
3 changed files with 6 additions and 6 deletions

View File

@ -344,7 +344,7 @@ function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime)
if entity.v == 0 and velo.x == 0 and velo.y == 0 and velo.z == 0 then
if stand_anim then
mobs:set_animation(entity, stand_anim)
entity:set_animation(stand_anim)
end
return
@ -352,7 +352,7 @@ function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime)
-- set moving animation
if moving_anim then
mobs:set_animation(entity, moving_anim)
entity:set_animation(moving_anim)
end
-- Stop!
@ -518,9 +518,9 @@ function mobs.fly(entity, _, speed, shoots, arrow, moving_anim, stand_anim)
-- change animation if stopped
if velo.x == 0 and velo.y == 0 and velo.z == 0 then
mobs:set_animation(entity, stand_anim)
entity:set_animation(stand_anim)
else
-- moving animation
mobs:set_animation(entity, moving_anim)
entity:set_animation(moving_anim)
end
end