]> git.pond.sub.org Git - empserver/commit
load lload: Drop dead "cannot carry land units" checks
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 1 May 2018 07:19:43 +0000 (09:19 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 5 Jan 2021 06:25:18 +0000 (07:25 +0100)
commit7c5e6e7f6d8a58fb26a5db0220e5b43356ae2173
treeaed335e76a519ff19fcebbc53893e92519753842
parent0851761fb92f9e343e873e32eb3a76bd41e7be6f
load lload: Drop dead "cannot carry land units" checks

load_land_ship() and load_land_land() fail for carriers that can't
carry any land units before prompting for land units to load.  They
then iterate over land units to load, and fail when the carrrier has
no room.  They either report "cannot carry land units" or "doesn't
have room for any more land units" then.  The former cannot happen.
Crept into load_land_ship() in Empire 2, blindly copied to
load_land_land() in 4.0.0.  load_plane_ship() and load_plane_land()
don't have this issue.

Drop the dead code.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/load.c