]> git.pond.sub.org Git - empserver/commitdiff
Remove dead code for estimating defense
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 3 Mar 2008 19:08:43 +0000 (20:08 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 14 Mar 2008 19:25:38 +0000 (20:25 +0100)
Clean up of intelligence_report().  Should have been done in commit
092a52f2.

include/land.h
src/lib/subs/lndsub.c

index caf730621e496425bc786750553e240f36362dc6..c15a7a9e30ed180019917a0e0d34a4f43570a716 100644 (file)
@@ -186,7 +186,7 @@ extern int lnd_take_casualty(int, struct ulist *, int);
 extern void lnd_submil(struct lndstr *, int);
 extern void lnd_takemob(struct emp_qelem *, double);
 extern int lnd_spyval(struct lndstr *);
-extern double intelligence_report(int, struct lndstr *, int, char *);
+extern void intelligence_report(int, struct lndstr *, int, char *);
 extern int count_sect_units(struct sctstr *);
 extern void count_units(struct shpstr *);
 extern void lnd_count_units(struct lndstr *);
index a6b4636e5132814e11cc729bde6404a181a53925..35f6805bff1b57ae9c7c7e86d20873788e77f4a6 100644 (file)
@@ -327,19 +327,18 @@ lnd_spyval(struct lndstr *lp)
        return lp->lnd_spy * (lp->lnd_effic / 100.0);
 }
 
-double
+void
 intelligence_report(int destination, struct lndstr *lp, int spy,
                    char *mess)
 {
     struct lchrstr *lcp;
     char buf1[80], buf2[80], buf3[80];
-    double estimate = 0.0;     /* estimated defense value */
 
     if (destination == 0)
-       return 0;
+       return;
 
     if (lp->lnd_own == 0)
-       return 0;
+       return;
 
     lcp = &lchr[(int)lp->lnd_type];
 
@@ -352,8 +351,6 @@ intelligence_report(int destination, struct lndstr *lp, int spy,
        else
            sprintf(buf1, "%s %s", mess, prland(lp));
 
-       estimate = lp->lnd_item[I_MILIT];
-
        if (chance((spy + lp->lnd_vis) / 20.0)) {
            if (destination == player->cnum)
                pr(" (eff %d, mil %d",
@@ -363,7 +360,6 @@ intelligence_report(int destination, struct lndstr *lp, int spy,
                sprintf(buf2, " (eff %d, mil %d",
                        roundintby(lp->lnd_effic, 5),
                        roundintby(lp->lnd_item[I_MILIT], 10));
-           estimate = lp->lnd_item[I_MILIT] * lp->lnd_effic / 100.0;
 
            if (chance((spy + lp->lnd_vis) / 20.0)) {
                int t;
@@ -390,11 +386,6 @@ intelligence_report(int destination, struct lndstr *lp, int spy,
     if (destination != player->cnum) {
        wu(0, destination, "%s%s%s", buf1, buf2, buf3);
     }
-
-    if (lp->lnd_ship < 0 || lcp->l_flags & L_MARINE)
-       estimate *= lp->lnd_def;
-
-    return estimate;
 }
 
 /* Used by the spy command to count land units in a sector.  If used