From d1af4269c4130d11d77f61f1a2ac8f3e249f72f2 Mon Sep 17 00:00:00 2001 From: jacopo grandi Date: Fri, 5 Mar 2021 16:54:26 +0100 Subject: unit generator in hud, minor fix in movement, % in view and cost weights --- gst/units.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gst/units.c') diff --git a/gst/units.c b/gst/units.c index 0297266..b5d05a9 100644 --- a/gst/units.c +++ b/gst/units.c @@ -155,10 +155,8 @@ int army_move_step (infos *info, army *ar, map *m, stats_unit *ustats) { } } // execution - int sum = 0, lastsum = -1, step = 0; + int sum = 0, step = 0; for (; stepmove_points -= 1; orders++; + sum++; } - sum += mcs[i].done; } + if (sum == 0) { break; } } if (step == MAXSOLVESTEPS) { printf("army: max steps reached\n"); } if (orders > 0) return 0; -- cgit v1.2.3-54-g00ecf