autoaim: fix crash on login

wsc-master
cora 2021-07-15 22:36:04 +02:00
parent a95e4cccfd
commit 1b8e237ca9
1 changed files with 1 additions and 0 deletions

View File

@ -1,4 +1,5 @@
local function look_nearest()
if not minetest.localplayer then return end
for k, v in ipairs(minetest.localplayer.get_nearby_objects(10)) do
if (v:is_player() and v:get_name() ~= minetest.localplayer:get_name()) then
local pos = v:get_pos()