nil check for mount

This commit is contained in:
TenPlus1 2021-05-21 17:46:10 +01:00
parent ec44aa91c4
commit 8012250258
1 changed files with 2 additions and 0 deletions

View File

@ -387,6 +387,8 @@ function mobs.fly(entity, _, speed, shoots, arrow, moving_anim, stand_anim)
local dir = entity.driver:get_look_dir()
local yaw = entity.driver:get_look_horizontal() + 1.57 -- offset fix between old and new commands
if not ctrl or not velo then return end
if ctrl.up then
entity.object:set_velocity({
x = dir.x * speed,