yet another fork update #9

Merged
chmodsayshello merged 760 commits from VoxeLibre/VoxeLibre:master into master 2023-03-26 20:27:31 +02:00
1 changed files with 2 additions and 1 deletions
Showing only changes of commit af86e73280 - Show all commits

View File

@ -47,7 +47,8 @@ end
function mob_class:player_in_active_range()
for _,p in pairs(minetest.get_connected_players()) do
if vector.distance(self.object:get_pos(),p:get_pos()) <= mob_active_range then return true end
local pos = self.object:get_pos()
if pos and vector.distance(pos, p:get_pos()) <= mob_active_range then return true end
-- slightly larger than the mc 32 since mobs spawn on that circle and easily stand still immediately right after spawning.
end
end