]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/satmap.c
License upgrade to GPL version 3 or later
[empserver] / src / lib / subs / satmap.c
index a14810fcb8201b531841de1c39bdb808349329fe..0de3c21ef533157d06a4f13feed4380f872b5ae2 100644 (file)
@@ -1,11 +1,11 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
- *                           Ken Stevens, Steve McClure
+ *  Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *                Ken Stevens, Steve McClure, Markus Armbruster
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  Empire is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
+ *  the Free Software Foundation, either version 3 of the License, or
  *  (at your option) any later version.
  *
  *  This program is distributed in the hope that it will be useful,
@@ -14,8 +14,7 @@
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  *  ---
  *
@@ -121,6 +120,8 @@ satmap(int x, int y, int eff, int range, int flags, int type)
            if (flags & P_S) {
                if (sect.sct_own && sect.sct_own != player->cnum) {
                    satdisp_sect(&sect, (flags & P_I) ? 5 : 50);
+                   changed += map_set(player->cnum, sect.sct_x, sect.sct_y,
+                                      dchr[sect.sct_type].d_mnem, 0);
                    ++count;
                    if (opt_HIDDEN)
                        setcont(player->cnum, sect.sct_own, FOUND_FLY);
@@ -167,7 +168,7 @@ satmap(int x, int y, int eff, int range, int flags, int type)
                pr("%4d %4d %-16.16s %-25.25s ",
                   ship.shp_own, ship.shp_uid,
                   mchr[(int)ship.shp_type].m_name, ship.shp_name);
-               prxy("%4d,%-4d ", ship.shp_x, ship.shp_y, player->cnum);
+               prxy("%4d,%-4d ", ship.shp_x, ship.shp_y);
                pr("%3d%%\n", ship.shp_effic);
                ++count;
                if (opt_HIDDEN)
@@ -213,7 +214,7 @@ satmap(int x, int y, int eff, int range, int flags, int type)
                pr("%4d %4d %-16.16s ",
                   land.lnd_own, land.lnd_uid,
                   lchr[(int)land.lnd_type].l_name);
-               prxy("%4d,%-4d", land.lnd_x, land.lnd_y, player->cnum);
+               prxy("%4d,%-4d", land.lnd_x, land.lnd_y);
                pr("%3d%%\n", land.lnd_effic);
                ++count;
                if (opt_HIDDEN)
@@ -258,7 +259,7 @@ sathead(void)
 void
 satdisp_sect(struct sctstr *sp, int acc)
 {
-    prxy("%4d,%-4d   ", sp->sct_x, sp->sct_y, player->cnum);
+    prxy("%4d,%-4d   ", sp->sct_x, sp->sct_y);
     pr("%c  %3d  %3d %3d %3d %3d %4d %4d %4d %4d %4d %4d %5d\n",
        dchr[sp->sct_type].d_mnem,
        sp->sct_own, roundintby((int)sp->sct_effic, acc / 2),
@@ -272,8 +273,6 @@ satdisp_sect(struct sctstr *sp, int acc)
        roundintby(sp->sct_item[I_IRON], acc),
        roundintby(sp->sct_item[I_PETROL], acc),
        roundintby(sp->sct_item[I_FOOD], acc));
-    map_set(player->cnum, sp->sct_x, sp->sct_y, dchr[sp->sct_type].d_mnem,
-           0);
 }
 
 void
@@ -298,7 +297,7 @@ satdisp_units(coord x, coord y)
        pr("\t%4d %4d %-16.16s %-25.25s ",
           ship.shp_own, ship.shp_uid,
           mchr[(int)ship.shp_type].m_name, ship.shp_name);
-       prxy("%4d,%-4d ", ship.shp_x, ship.shp_y, player->cnum);
+       prxy("%4d,%-4d ", ship.shp_x, ship.shp_y);
        pr("%3d%%\n", ship.shp_effic);
     }
 
@@ -325,7 +324,7 @@ satdisp_units(coord x, coord y)
 
        pr("\t%4d %4d %-16.16s ",
           land.lnd_own, land.lnd_uid, lchr[(int)land.lnd_type].l_name);
-       prxy("%4d,%-4d ", land.lnd_x, land.lnd_y, player->cnum);
+       prxy("%4d,%-4d ", land.lnd_x, land.lnd_y);
        pr("%3d%%\n", land.lnd_effic);
     }