Fix nation command to use correct coordinate system

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.
This commit is contained in:
Markus Armbruster 2010-05-16 10:40:00 +02:00
parent 4773519c3c
commit bedf3ae415

View file

@ -68,14 +68,15 @@ nati(void)
getsect(natp->nat_xcap, natp->nat_ycap, &sect); getsect(natp->nat_xcap, natp->nat_ycap, &sect);
if (influx(natp)) if (influx(natp))
pr("No capital (was at %s).\n", 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 { else {
civ = sect.sct_item[I_CIVIL]; civ = sect.sct_item[I_CIVIL];
mil = sect.sct_item[I_MILIT]; mil = sect.sct_item[I_MILIT];
pr("%d%% eff %s at %s has %d civilian%s & %d military\n", pr("%d%% eff %s at %s has %d civilian%s & %d military\n",
sect.sct_effic, sect.sct_effic,
sect.sct_type == SCT_CAPIT ? "capital" : "mountain capital", 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);