]> git.pond.sub.org Git - empserver/commitdiff
subs: Drop unused spy detection roll from unitsatxy()
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 21 Jul 2016 19:00:47 +0000 (21:00 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:18 +0000 (20:09 +0200)
The die roll was added in 4.0.17 to hide spies from bombers.  However,
players could roll dice as often as they wanted, by typing '?' at the
target prompt.  The broken die roll is unreachable since commit
7688aed disallowed bombing of spies.  Drop it.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/subs/list.c

index 4534dfd43a0b9697c7867924a4a54f7ce40a19f5..35d4309ea27d3e694d84c315801528bdaea5b532 100644 (file)
@@ -124,7 +124,6 @@ unitsatxy(coord x, coord y, int wantflags, int nowantflags)
     while (nxtitem(&ni, &land)) {
        if (land.lnd_effic < LAND_MINEFF || land.lnd_own == 0)
            continue;
-       /* Can't bomb units on ships or other units */
        if (land.lnd_ship >= 0 || land.lnd_land >= 0)
            continue;
        lp = &lchr[(int)land.lnd_type];
@@ -138,11 +137,6 @@ unitsatxy(coord x, coord y, int wantflags, int nowantflags)
                continue;
        }
 
-       if (lp->l_flags & L_SPY) {
-           if (!(chance(LND_SPY_DETECT_CHANCE(land.lnd_effic))))
-               continue;
-       }
-
        if (!units)
            pr(" #          owner           eff       type\n");
        pr("(#%3d) %10.10s  %12.12s  %s\n", ni.cur,