]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/satmap.c
Update copyright notice
[empserver] / src / lib / subs / satmap.c
index cf69c5f0c13e88a776468cd6718ce41bb2c7c054..a14810fcb8201b531841de1c39bdb808349329fe 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -26,7 +26,7 @@
  *  ---
  *
  *  satmap.c: Do a satellite map given an x,y location, effic and other
- * 
+ *
  *  Known contributors to this file:
  *     Steve McClure, 2000
  */
@@ -54,7 +54,6 @@ static char *radbuf;
 void
 satmap(int x, int y, int eff, int range, int flags, int type)
 {
-    int acc;
     struct sctstr sect;
     struct shpstr ship;
     struct lndstr land;
@@ -112,7 +111,6 @@ satmap(int x, int y, int eff, int range, int flags, int type)
            pr("Satellite sector report\n");
            prdate();
            sathead();
-           acc = (flags & P_I) ? 5 : 50;
        }
        crackle = count = 0;
        while (nxtsct(&ns, &sect)) {
@@ -122,7 +120,7 @@ satmap(int x, int y, int eff, int range, int flags, int type)
                continue;
            if (flags & P_S) {
                if (sect.sct_own && sect.sct_own != player->cnum) {
-                   satdisp_sect(&sect, acc);
+                   satdisp_sect(&sect, (flags & P_I) ? 5 : 50);
                    ++count;
                    if (opt_HIDDEN)
                        setcont(player->cnum, sect.sct_own, FOUND_FLY);
@@ -265,7 +263,7 @@ satdisp_sect(struct sctstr *sp, int acc)
        dchr[sp->sct_type].d_mnem,
        sp->sct_own, roundintby((int)sp->sct_effic, acc / 2),
        roundintby((int)sp->sct_road, acc / 2),
-       roundintby((int)sp->sct_rail, acc / 2),
+       opt_RAILWAYS ? !!sct_rail_track(sp) : roundintby(sp->sct_rail, acc / 2),
        roundintby((int)sp->sct_defense, acc / 2),
        roundintby(sp->sct_item[I_CIVIL], acc),
        roundintby(sp->sct_item[I_MILIT], acc),