Fix empdump not to depend on POGO's origin

Treat NATID_BAD as deity with absolute coordinates in nstr_exec_val()
and xdinit().  Use that in dump_table().
This commit is contained in:
Markus Armbruster 2008-03-24 15:06:36 +01:00
parent 9c2a05e126
commit ee863c5d25
3 changed files with 31 additions and 11 deletions

View file

@ -82,7 +82,8 @@
#include "xdump.h"
/*
* Initialize XD to dump for country CNUM.
* Initialize XD.
* Translate dump for country CNUM, except when CNUM is NATID_BAD.
* If HUMAN, dump in human-readable format.
* Dump is to be delivered through callback PR.
* Return XD.
@ -91,7 +92,7 @@ struct xdstr *
xdinit(struct xdstr *xd, natid cnum, int human, void (*pr)(char *fmt, ...))
{
xd->cnum = cnum;
xd->divine = getnatp(cnum)->nat_stat == STAT_GOD;
xd->divine = cnum == NATID_BAD || getnatp(cnum)->nat_stat == STAT_GOD;
xd->human = human;
xd->pr = pr;
return xd;