From: Markus Armbruster Date: Sat, 6 Aug 2016 16:02:44 +0000 (+0200) Subject: lboard: Don't permit boarding of embarked land units X-Git-Tag: v4.4.0~110 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=4c21c69accf4c436f872a4e5e1613672718ab7c5 lboard: Don't permit boarding of embarked land units You can board land units loaded on a ship or land unit. This makes no sense. Reject attempts to board land units on a ship or land unit exactly like attempts to board land units that don't exist. Signed-off-by: Markus Armbruster --- diff --git a/src/lib/subs/attsub.c b/src/lib/subs/attsub.c index 65aac889f..373af6b8b 100644 --- a/src/lib/subs/attsub.c +++ b/src/lib/subs/attsub.c @@ -188,7 +188,8 @@ att_get_combat(struct combat *com, int isdef) y = com->y; break; case EF_LAND: - if (!getland(com->lnd_uid, &land) || !land.lnd_own) { + if (!getland(com->lnd_uid, &land) || !land.lnd_own + || land.lnd_ship >= 0 || land.lnd_land >= 0) { if (isdef) pr("Land unit #%d is not in the same sector!\n", com->lnd_uid);