Skip to content

Commit 3ec0d7d

Browse files
committed
Prevented sporadic capture target loss due to bungled ownership swap
1 parent 82e8ea9 commit 3ec0d7d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

gamedata/scripts/sim_faction.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ function se_sim_faction:calculate_squad_tasks()
544544
end
545545
else
546546
if squad_data.dest_smart.id == target_smart_id then
547-
gr_dist = squad_data.graph_point:distance_to(target_smart_gpoint) * 0.001
547+
gr_dist = squad_data.graph_point:distance_to(target_smart_gpoint) * 0.001 + 0.1 -- increment ensures 0-dist stayer always preferred to 0-dist mover
548548
else
549549
gr_dist = squad_data.graph_point_dest:distance_to(target_smart_gpoint) + 1
550550
end

0 commit comments

Comments
 (0)