From 747af786a8a0a1a1fcdd2adc193a1e59c8011ec1 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 29 Jul 2023 08:34:09 +0100 Subject: [PATCH] player nil check for mob attach --- mount.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mount.lua b/mount.lua index 296b63f..158d70b 100644 --- a/mount.lua +++ b/mount.lua @@ -186,6 +186,8 @@ end function mobs.attach(entity, player) + if not player then return end + entity.player_rotation = entity.player_rotation or {x = 0, y = 0, z = 0} entity.driver_attach_at = entity.driver_attach_at or {x = 0, y = 0, z = 0} entity.driver_eye_offset = entity.driver_eye_offset or {x = 0, y = 0, z = 0}