]> git.pond.sub.org Git - empserver/commitdiff
Make llook ignore land units and planes loaded on land units
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 16 Jul 2011 09:47:52 +0000 (11:47 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 16 Jul 2011 11:47:48 +0000 (13:47 +0200)
Probably overlooked when trains were added in 4.0.0.

src/lib/commands/look.c

index ddf6e40152e65eb72cb5e518201ba152d9849a9c..55dd15e2051c483c3191a94cec668f172d0cd7a1 100644 (file)
@@ -222,7 +222,7 @@ look_land(struct lndstr *lookland)
     for (i = 0; NULL != (lp = getlandp(i)); i++) {
        if (lp->lnd_own == player->cnum || lp->lnd_own == 0)
            continue;
-       if (lp->lnd_ship >= 0)
+       if (lp->lnd_ship >= 0 || lp->lnd_land >= 0)
            continue;
        /* Don't always see spies */
        if (lchr[(int)lp->lnd_type].l_flags & L_SPY) {
@@ -249,7 +249,7 @@ look_land(struct lndstr *lookland)
     for (i = 0; NULL != (pp = getplanep(i)); i++) {
        if (pp->pln_own == player->cnum || pp->pln_own == 0)
            continue;
-       if (pp->pln_ship >= 0)
+       if (pp->pln_ship >= 0 || pp->pln_land >= 0)
            continue;
        if (pp->pln_flags & PLN_LAUNCHED)
            continue;