]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/rada.c
Fix trailing whitespace
[empserver] / src / lib / commands / rada.c
index 8ce640d7a9fb448077a11dbca29e17df575e078f..af91ceaa0faf289503c3def40aef4e671504575a 100644 (file)
@@ -26,7 +26,7 @@
  *  ---
  *
  *  rada.c: Do radar from a ship/unit/sector
- * 
+ *
  *  Known contributors to this file:
  *     Ron Koenderink, 2006
  */
@@ -61,9 +61,12 @@ radar(short type)
     char buf[1024];
     char prompt[80];
 
+    if (CANT_HAPPEN(type != EF_LAND && type != EF_SHIP))
+       type = EF_SHIP;
+
     sprintf(prompt, "Radar from (%s # or sector(s)) : ", ef_nameof(type));
     cp = getstarg(player->argp[1], prompt, buf);
-                     
+
     if (cp == 0)
        return RET_SYN;
     switch (sarg_type(cp)) {
@@ -87,7 +90,7 @@ radar(short type)
     case NS_LIST:
     case NS_GROUP:
        /* assumes a NS_LIST return is a unit no */
-       if (!snxtitem(&ni, type, cp)) {
+       if (!snxtitem(&ni, type, cp, NULL)) {
            pr("Specify at least one %s\n", ef_nameof(type));
            return RET_SYN;
        }
@@ -109,7 +112,8 @@ radar(short type)
                    pr("Units on ships can't use radar!\n");
                    continue;
                }
-               tech = techfact(item.land.lnd_tech, item.land.lnd_spy);
+               tech = techfact(item.land.lnd_tech,
+                               lchr[item.land.lnd_type].l_spy);
            }
 
            pr("%s at ", obj_nameof(&item.gen));