forked from mtcontrib/maidroid
Merge pull request #27 from tacigar/tacigar/use-automatic_face_movement_dir
[FIX] fix get_nearest_player
This commit is contained in:
commit
5bc296c613
@ -74,6 +74,7 @@ function maidroid.maidroid.get_nearest_player(self, range_distance)
|
|||||||
local distance = vector.distance(position, player_position)
|
local distance = vector.distance(position, player_position)
|
||||||
|
|
||||||
if distance < min_distance then
|
if distance < min_distance then
|
||||||
|
min_distance = distance
|
||||||
player = object
|
player = object
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user