Add nil check in mobs (tmpyaw)

This commit is contained in:
Wuzzy 2020-04-07 14:54:15 +02:00
parent 5dc014ed22
commit 095085cc38
1 changed files with 3 additions and 0 deletions

View File

@ -290,6 +290,9 @@ function mobs:register_mob(name, def)
end
local tmpyaw = self.object:get_yaw()
if not tmpyaw then
return
end
local yaw = self.rotate
if tmpyaw ~= tmpyaw then -- It's a NaN value