]> git.pond.sub.org Git - empserver/commit
retreat: Don't charge mobility for retreating in direction 'h'
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 21 Jan 2014 19:04:20 +0000 (20:04 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 16 Feb 2014 12:19:26 +0000 (13:19 +0100)
commitb3453efdfc2c9dc00086dd8396c753854930960b
treea14874c6a6b7943a4720c1344a62943bc36f6819
parent98cb83302cdb0ea3e8503356736607baf4246946
retreat: Don't charge mobility for retreating in direction 'h'

Obscure feature: 'h' in a retreat path stops the current retreat.  The
code treats that as entering the current sector again, thus charges
mobility for staying put.  It also reports "could not retreat to" for
a ship or land unit that can retreat out of, but could not retreat
into its current sector, e.g. a ship in an unfriendly harbor.

Fix by cleaning up the tortuous control flow.

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