forked from VoxeLibre/VoxeLibre
fix warning
This commit is contained in:
parent
8d0c3cd137
commit
ecd62dbba1
|
@ -575,7 +575,7 @@ function mob_class:is_object_in_view(object_list, object_range, node_range, turn
|
||||||
if object_pos and turn_around then
|
if object_pos and turn_around then
|
||||||
|
|
||||||
local vec = vector.subtract(object_pos, s)
|
local vec = vector.subtract(object_pos, s)
|
||||||
yaw = (atan(vec.z / vec.x) + 3 *math.pi/ 2) - self.rotate
|
local yaw = (atan(vec.z / vec.x) + 3 *math.pi/ 2) - self.rotate
|
||||||
if object_pos.x > s.x then yaw = yaw + math.pi end
|
if object_pos.x > s.x then yaw = yaw + math.pi end
|
||||||
|
|
||||||
yaw = self:set_yaw(yaw, 4)
|
yaw = self:set_yaw(yaw, 4)
|
||||||
|
|
Loading…
Reference in New Issue