forked from MineClone5/MineClone5
Fix attempt to perform arithmetic on a nil value in mount.lua:232
This commit is contained in:
parent
7d7da2ba8b
commit
79170e2386
|
@ -229,7 +229,8 @@ function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime)
|
|||
-- mob rotation
|
||||
local rotate = entity.rotate
|
||||
if rotate then
|
||||
local yaw = entity.driver:get_look_horizontal() - rotate
|
||||
local driver_look_horizontal = entity.driver:get_look_horizontal() or 0
|
||||
local yaw = driver_look_horizontal - rotate
|
||||
entity.yaw = yaw
|
||||
entity.object:set_yaw(yaw)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue