]> git.pond.sub.org Git - empserver/commitdiff
Fix nation command to use correct coordinate system
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 16 May 2010 08:40:00 +0000 (10:40 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 21 Jun 2010 19:03:21 +0000 (21:03 +0200)
It reported capital location in the nation's coordinate system instead
of the player's.  Fortunately, they're the same in normal usage.  They
can differ only when a deity requests a nation report for another
country.

src/lib/commands/nati.c

index 12a81e16013fd9cad6e47ff14277fc683462ce10..58e03276319e13ce07d71ab00bf883082ef7945e 100644 (file)
@@ -68,14 +68,15 @@ nati(void)
        getsect(natp->nat_xcap, natp->nat_ycap, &sect);
        if (influx(natp))
            pr("No capital (was at %s).\n",
        getsect(natp->nat_xcap, natp->nat_ycap, &sect);
        if (influx(natp))
            pr("No capital (was at %s).\n",
-              xyas(sect.sct_x, sect.sct_y, cnum));
+              xyas(sect.sct_x, sect.sct_y, player->cnum));
        else {
            civ = sect.sct_item[I_CIVIL];
            mil = sect.sct_item[I_MILIT];
            pr("%d%% eff %s at %s has %d civilian%s & %d military\n",
               sect.sct_effic,
               sect.sct_type == SCT_CAPIT ? "capital" : "mountain capital",
        else {
            civ = sect.sct_item[I_CIVIL];
            mil = sect.sct_item[I_MILIT];
            pr("%d%% eff %s at %s has %d civilian%s & %d military\n",
               sect.sct_effic,
               sect.sct_type == SCT_CAPIT ? "capital" : "mountain capital",
-              xyas(sect.sct_x, sect.sct_y, cnum), civ, splur(civ), mil);
+              xyas(sect.sct_x, sect.sct_y, player->cnum),
+              civ, splur(civ), mil);
        }
     }
     pr(" The treasury has $%.2f", (double)natp->nat_money);
        }
     }
     pr(" The treasury has $%.2f", (double)natp->nat_money);