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 <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2016-09-18 11:04:37 +02:00
parent 849af9e06c
commit e55fb2227b

View file

@ -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]);