Fix "sector can board" test to ignore land units on land units

boar() lets a sector board if it has mobility or usable land units.
Embarked land units are not usable.  But it tests only "on ship", not
"on land unit".  Broken in 4.0.17.
This commit is contained in:
Markus Armbruster 2011-07-16 11:38:50 +02:00
parent 41dc6de306
commit 0a693c1fa2

View file

@ -90,7 +90,7 @@ boar(void)
while (nxtitem(&ni, &land)) { while (nxtitem(&ni, &land)) {
if (land.lnd_own != player->cnum) if (land.lnd_own != player->cnum)
continue; continue;
if (land.lnd_ship >= 0) if (land.lnd_ship >= 0 || land.lnd_land >= 0)
continue; continue;
if (land.lnd_mobil <= 0) if (land.lnd_mobil <= 0)
continue; continue;