mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 20:41:11 +01:00
Rename detect_players_in_area to detect_closest_player_within_radius
This commit is contained in:
parent
ac08c6991c
commit
348df0fcec
2 changed files with 2 additions and 2 deletions
|
@ -600,7 +600,7 @@ mobs.mob_step = function(self, dtime)
|
||||||
--true for line_of_sight is debug
|
--true for line_of_sight is debug
|
||||||
--10 for radius is debug
|
--10 for radius is debug
|
||||||
--1 for eye height adjust 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
|
if attacking then
|
||||||
print(attacking:get_player_name())
|
print(attacking:get_player_name())
|
||||||
|
|
|
@ -14,7 +14,7 @@ local do_tnt = function(obj, damage)
|
||||||
end
|
end
|
||||||
|
|
||||||
--a fast function to be able to detect only players without using objects_in_radius
|
--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
|
line_of_sight = line_of_sight or true --fallback line_of_sight
|
||||||
radius = radius or 10 -- fallback radius
|
radius = radius or 10 -- fallback radius
|
||||||
|
|
Loading…
Reference in a new issue