forked from VoxeLibre/VoxeLibre
[mcl_mobs/api] Fix critical attempt to index local pos2 (a nil value)
This commit is contained in:
parent
f30a2ab6bc
commit
ed8d79395d
|
@ -125,6 +125,9 @@ mobs.set_yaw_while_attacking = function(self)
|
|||
pos1.y = 0
|
||||
|
||||
local pos2 = self.attacking:get_pos()
|
||||
if not pos2 then
|
||||
return
|
||||
end
|
||||
pos2.y = 0
|
||||
|
||||
local new_direction = vector_direction(pos1,pos2)
|
||||
|
|
Loading…
Reference in New Issue