mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-07-11 12:40:38 +02:00
fix nil value when mob not available
This commit is contained in:
@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user