]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/list.c
Fix trailing whitespace
[empserver] / src / lib / subs / list.c
index 6c206e69861c976d45280afd4cbc2321f38d0eaa..e91dc2796a45077f899b61b966f4bb9be3e36edc 100644 (file)
@@ -26,7 +26,7 @@
  *  ---
  *
  *  list.c: List ships, planes, units at a given x,y
- * 
+ *
  *  Known contributors to this file:
  *     Dave Pare, 1986
  */
@@ -178,6 +178,8 @@ planesatxy(coord x, coord y, int wantflags, int nowantflags)
     while (nxtitem(&ni, &plane)) {
        if (plane.pln_effic < PLANE_MINEFF || plane.pln_own == 0)
            continue;
+       if (plane.pln_ship >= 0 || plane.pln_land >= 0)
+           continue;
        if (plane.pln_flags & PLN_LAUNCHED)
            continue;
        plp = &plchr[(int)plane.pln_type];
@@ -244,33 +246,6 @@ asw_shipsatxy(coord x, coord y, int wantflags, int nowantflags,
     return ships;
 }
 
-int
-num_shipsatxy(coord x, coord y, int wantflags, int nowantflags)
-{
-    int ships;
-    struct nstr_item ni;
-    struct mchrstr *mp;
-    struct shpstr ship;
-
-    ships = 0;
-    snxtitem_xy(&ni, EF_SHIP, x, y);
-    while (nxtitem(&ni, &ship)) {
-       if (ship.shp_effic < SHIP_MINEFF || ship.shp_own == 0)
-           continue;
-       mp = &mchr[(int)ship.shp_type];
-       if (wantflags) {
-           if ((mp->m_flags & wantflags) == 0)
-               continue;
-       }
-       if (nowantflags) {
-           if (mp->m_flags & nowantflags)
-               continue;
-       }
-       ships++;
-    }
-    return ships;
-}
-
 int
 adj_units(coord x, coord y, natid own)
 {