From e55fb2227bb7a90bfe3e18a36fb359e07eea4b8c Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 18 Sep 2016 11:04:37 +0200 Subject: [PATCH] update/revolt: Fix mil count for che move after getting caught When military catch che, their their count isn't updated for their losses. The count is later used when che consider moving to an adjacent sector. This could conceivably make them move instead of stay. Broken when Chainsaw 3 added land units. Fix it. Note that the sector's military count includes land units, but the adjacent sectors' doesn't. Should be improved some day; add a TODO comment. Signed-off-by: Markus Armbruster --- src/lib/update/revolt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/update/revolt.c b/src/lib/update/revolt.c index 94680299..bb01769d 100644 --- a/src/lib/update/revolt.c +++ b/src/lib/update/revolt.c @@ -295,6 +295,7 @@ guerrilla(struct sctstr *sp) } } take_casualties(sp, mc); + mil -= mc; recruit = 0; } } @@ -362,6 +363,7 @@ domove: else min_mil = mil; /* search adjacent sectors for a nice one */ + /* TODO consider land units in addition to mil */ for (n = 1; n <= 6; n++) { nsp = getsectp(sp->sct_x + diroff[n][0], sp->sct_y + diroff[n][1]);