Simplify tests for presence of load

Instead of counting the load with lnd_nland() / lnd_nxlight(), check
whether there's at least one loaded with lnd_first_on_land() /
pln_first_on_land().
This commit is contained in:
Markus Armbruster 2008-09-07 20:37:52 -04:00
parent 3e370da58c
commit 9189e67ad7
2 changed files with 3 additions and 3 deletions

View file

@ -148,7 +148,7 @@ trade_desc(struct trdstr *tp, union empobj_storage *tgp)
land.lnd_tech,
land.lnd_effic,
lchr[(int)land.lnd_type].l_name, land.lnd_uid);
if (lnd_nxlight(&land)) {
if (pln_first_on_land(&land) >= 0) {
snxtitem_all(&ni, EF_PLANE);
while (nxtitem(&ni, &plane)) {
if (plane.pln_land == land.lnd_uid) {