From 79170e238665949f9b874dea12d1f7ec450db25a Mon Sep 17 00:00:00 2001 From: kay27 Date: Wed, 12 Jan 2022 04:33:55 +0400 Subject: [PATCH] Fix attempt to perform arithmetic on a nil value in mount.lua:232 --- mods/ENTITIES/mcl_mobs/api/mount.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_mobs/api/mount.lua b/mods/ENTITIES/mcl_mobs/api/mount.lua index 11b2e5e89..dc56ee353 100644 --- a/mods/ENTITIES/mcl_mobs/api/mount.lua +++ b/mods/ENTITIES/mcl_mobs/api/mount.lua @@ -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