mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-12-25 10:10:21 +01:00
fix nil value when mob not available
This commit is contained in:
parent
7179dc86e6
commit
f040ee5bc7
@ -212,7 +212,8 @@ function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- fix mob rotation
|
-- fix mob rotation
|
||||||
entity.object:set_yaw(entity.driver:get_look_horizontal() - entity.rotate)
|
local horz = entity.driver:get_look_horizontal() or 0
|
||||||
|
entity.object:set_yaw(horz - entity.rotate)
|
||||||
|
|
||||||
if can_fly then
|
if can_fly then
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user