Skip to content

Commit

Permalink
Вернул как было
Browse files Browse the repository at this point in the history
чтобы неписи шли в ближайшие смарты. А то у нас получается, что на кордоне полный треш, а на затоне собачки с кордона обычные бегают.
  • Loading branch information
naxac committed Nov 5, 2022
1 parent 0122a76 commit 0939fdb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Game/gamedata/scripts/xr_gulag.script
Expand Up @@ -708,17 +708,17 @@ end
-- найти ближайшего подходящего персонажа из списка
function gulag:find_nearest_suitable_obj( objs, job )
local predicate = job.predicate
local min_dist = -math.huge
-- local min_dist = math.huge
-- local min_dist = -math.huge
local min_dist = math.huge
local dist
local obj_nearest

for obj_id, v in pairs( objs ) do
if (not predicate) or predicate( self.npc_info[obj_id], self ) then
dist = self:distance_to_job_location( obj_id, job )

if dist > min_dist then
-- if dist < min_dist then
-- if dist > min_dist then
if dist < min_dist then
min_dist = dist
obj_nearest = obj_id
end
Expand Down

0 comments on commit 0939fdb

Please sign in to comment.