mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-02-24 13:50:22 +01:00
nil check for mount
This commit is contained in:
parent
ec44aa91c4
commit
8012250258
@ -387,6 +387,8 @@ function mobs.fly(entity, _, speed, shoots, arrow, moving_anim, stand_anim)
|
|||||||
local dir = entity.driver:get_look_dir()
|
local dir = entity.driver:get_look_dir()
|
||||||
local yaw = entity.driver:get_look_horizontal() + 1.57 -- offset fix between old and new commands
|
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
|
if ctrl.up then
|
||||||
entity.object:set_velocity({
|
entity.object:set_velocity({
|
||||||
x = dir.x * speed,
|
x = dir.x * speed,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user