]> git.pond.sub.org Git - empserver/commit
navigate march: Wipe mission and retreat orders less eagerly
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 5 Jan 2015 10:07:50 +0000 (11:07 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 2 Mar 2015 07:20:47 +0000 (08:20 +0100)
commit797abf4c8ffaaa6faf8a8326cbcaafc2dbf7a021
treebb8142970749da08e7f3c351fa5cd553f8147ad4
parent351bb852a3c85d1bb00b07a6b2758381ba3c4298
navigate march: Wipe mission and retreat orders less eagerly

navi() uses shp_sel() to collect ships, then shp_nav() to drop
ineligible ships.  shp_sel() wipes mission and retreat orders.  Stupid
when shp_nav() will drop them right away.

Avoid that by having shp_sel() check shp_nav()'s conditions, too.

navi()'s shp_nav() call won't find anything to drop now.  The call
will be removed shortly.

This drops "& stays in" from some failure reports, since shp_nav()'s
reject messages end with "& stays in X,Y", and shp_sel()'s don't.

Likewise for marc(), lnd_sel(), lnd_mar().

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/subs/lndsub.c
src/lib/subs/shpsub.c
tests/navi-march/final.xdump
tests/navi-march/journal.log