]> git.pond.sub.org Git - empserver/commit
navigate: Don't scatter ships on canal entry
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 28 Dec 2014 16:42:44 +0000 (17:42 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 28 Feb 2015 15:12:02 +0000 (16:12 +0100)
commitd89825116ef130b971c17d674ee963c3a1e1a03a
tree73f1d0580cb76c6f2690fbd392de236a4ab2600d
parent6e386d101a22292e3dd1a377e4dd007d5951ad6c
navigate: Don't scatter ships on canal entry

When attempting to enter a sector with a ship that can't go there
while the navigating ships are all in the same sector, navigate stops
and prompts without removing the incapable ship from the group.  If
another ship has already entered the sector, the group becomes
scattered.

This can happen only when navigating a mixed group of ships with and
without canal capability into a canal.  Broken in commit 74e4e281,
v4.3.0.

Remove the incapable ship from the group when another ship can enter
the sector.  This avoids scattering ships.

Don't remove incapable ships when no ship can enter the sector.
Without this, navigate would remove everyone and end then.

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