player nil check for mob attach

This commit is contained in:
tenplus1 2023-07-29 08:34:09 +01:00
parent 8201c165e7
commit 747af786a8
1 changed files with 2 additions and 0 deletions

View File

@ -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}