From 387826659aa723079182ed66639191966766d834 Mon Sep 17 00:00:00 2001 From: Decane Date: Mon, 16 Dec 2019 13:24:18 +0000 Subject: [PATCH] Prevented sporadic capture target loss due to bungled ownership swap --- gamedata/scripts/sim_faction.script | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamedata/scripts/sim_faction.script b/gamedata/scripts/sim_faction.script index 321b1f90..ba88cec1 100644 --- a/gamedata/scripts/sim_faction.script +++ b/gamedata/scripts/sim_faction.script @@ -544,7 +544,7 @@ function se_sim_faction:calculate_squad_tasks() end else if squad_data.dest_smart.id == target_smart_id then - gr_dist = squad_data.graph_point:distance_to(target_smart_gpoint) * 0.001 + 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 else gr_dist = squad_data.graph_point_dest:distance_to(target_smart_gpoint) + 1 end