subs: Normalize checks whether a ship just read exists
A ship just read from the ship file exists unless its owner is zero. Check that instead of whether efficiency is below minimum. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
6ed6d658d1
commit
73e7765981
2 changed files with 2 additions and 2 deletions
|
@ -958,7 +958,7 @@ ask_olist(int combat_mode, struct combat *off, struct combat *def,
|
||||||
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_effic < LAND_MINEFF)
|
if (!land.lnd_own)
|
||||||
continue;
|
continue;
|
||||||
if (land_answer[(int)land.lnd_army] == 'N')
|
if (land_answer[(int)land.lnd_army] == 'N')
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -826,7 +826,7 @@ pln_put1(struct plist *plp)
|
||||||
/* We should do more, like make sure it's really
|
/* We should do more, like make sure it's really
|
||||||
a carrier, etc. but for now just make sure it's
|
a carrier, etc. but for now just make sure it's
|
||||||
not sunk. */
|
not sunk. */
|
||||||
if (ship.shp_effic < SHIP_MINEFF) {
|
if (!ship.shp_own) {
|
||||||
mpr(pp->pln_own,
|
mpr(pp->pln_own,
|
||||||
"Ship #%d has been sunk, plane #%d has nowhere to land, and\n"
|
"Ship #%d has been sunk, plane #%d has nowhere to land, and\n"
|
||||||
"splashes into the sea.\n",
|
"splashes into the sea.\n",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue