(STAT_ABS): Only set by files program for country #0. Prevents offset
and origin commands from working. Remove.
This commit is contained in:
parent
4abeea5de9
commit
c13a592bf5
3 changed files with 5 additions and 16 deletions
|
@ -97,7 +97,6 @@ struct natstr {
|
|||
#define STAT_SANCT bit(1) /* country in sanctuary */
|
||||
#define STAT_NORM bit(2) /* normal country */
|
||||
#define STAT_GOD bit(3) /* deity powers */
|
||||
#define STAT_ABS bit(4) /* abs coords */
|
||||
#define STAT_NEW bit(5) /* just initialized */
|
||||
|
||||
/* Update fields. */
|
||||
|
|
|
@ -69,11 +69,7 @@ xrel(struct natstr *np, coord absx)
|
|||
{
|
||||
coord x;
|
||||
|
||||
if ((np->nat_stat & STAT_ABS) == 0) {
|
||||
x = XNORM(absx - np->nat_xorg);
|
||||
} else {
|
||||
x = XNORM(absx);
|
||||
}
|
||||
if (x >= WORLD_X / 2)
|
||||
x -= WORLD_X;
|
||||
else if (x < -WORLD_X / 2)
|
||||
|
@ -86,11 +82,7 @@ yrel(struct natstr *np, coord absy)
|
|||
{
|
||||
coord y;
|
||||
|
||||
if ((np->nat_stat & STAT_ABS) == 0) {
|
||||
y = YNORM(absy - np->nat_yorg);
|
||||
} else {
|
||||
y = YNORM(absy);
|
||||
}
|
||||
if (y >= WORLD_Y / 2)
|
||||
y -= WORLD_Y;
|
||||
else if (y < -WORLD_Y / 2)
|
||||
|
@ -161,7 +153,6 @@ strtoy(char *str, char **end)
|
|||
coord
|
||||
xabs(struct natstr *np, coord relx)
|
||||
{
|
||||
if ((np->nat_stat & STAT_ABS) == 0)
|
||||
relx += np->nat_xorg;
|
||||
return XNORM(relx);
|
||||
}
|
||||
|
@ -169,7 +160,6 @@ xabs(struct natstr *np, coord relx)
|
|||
coord
|
||||
yabs(struct natstr *np, coord rely)
|
||||
{
|
||||
if ((np->nat_stat & STAT_ABS) == 0)
|
||||
rely += np->nat_yorg;
|
||||
return YNORM(rely);
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ main(int argc, char *argv[])
|
|||
nat.ef_type = EF_NATION;
|
||||
strcpy(nat.nat_cnam, "POGO");
|
||||
strcpy(nat.nat_pnam, "peter");
|
||||
nat.nat_stat = STAT_INUSE | STAT_NORM | STAT_GOD | STAT_ABS;
|
||||
nat.nat_stat = STAT_INUSE | STAT_NORM | STAT_GOD;
|
||||
nat.nat_btu = 255;
|
||||
nat.nat_money = 123456789;
|
||||
nat.nat_cnum = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue