1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2024-11-13 05:50:17 +01:00

nil check for mount

This commit is contained in:
TenPlus1 2021-05-21 17:46:10 +01:00
parent ec44aa91c4
commit 8012250258

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,