From 348df0fcecc2709fe088493d5665112827f08129 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Tue, 20 Apr 2021 16:46:10 -0400 Subject: [PATCH] Rename detect_players_in_area to detect_closest_player_within_radius --- mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua | 2 +- mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua index ae28c8cdbc..1ad9cc6592 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/ai.lua @@ -600,7 +600,7 @@ mobs.mob_step = function(self, dtime) --true for line_of_sight is debug --10 for radius is debug --1 for eye height adjust is debug - local attacking = mobs.detect_players_in_area(self,true,10,1) + local attacking = mobs.detect_closest_player_within_radius(self,true,10,1) if attacking then print(attacking:get_player_name()) diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua index 7935dc7cc1..b5d575ab01 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua @@ -14,7 +14,7 @@ local do_tnt = function(obj, damage) end --a fast function to be able to detect only players without using objects_in_radius -mobs.detect_players_in_area = function(self, line_of_sight, radius, object_height_adder) +mobs.detect_closest_player_within_radius = function(self, line_of_sight, radius, object_height_adder) line_of_sight = line_of_sight or true --fallback line_of_sight radius = radius or 10 -- fallback radius