forked from VoxeLibre/VoxeLibre
Rename detect_players_in_area to detect_closest_player_within_radius
This commit is contained in:
parent
ac08c6991c
commit
348df0fcec
|
@ -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())
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue