(nat_cap, status): Use the new function influx() to determine
if a valid capital is present or not.
This commit is contained in:
parent
7b507bd1d5
commit
9b3e820d3a
2 changed files with 6 additions and 15 deletions
|
@ -85,15 +85,10 @@ nat_cap(int btu)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if ((player->nstat & NORM) == NORM) {
|
if ((player->nstat & NORM) == NORM) {
|
||||||
if (player->owner && (sect.sct_type == SCT_CAPIT ||
|
if (influx(np))
|
||||||
sect.sct_type == SCT_MOUNT ||
|
|
||||||
sect.sct_type == SCT_SANCT))
|
|
||||||
player->nstat |= CAP;
|
|
||||||
else
|
|
||||||
player->nstat &= ~CAP;
|
player->nstat &= ~CAP;
|
||||||
/* Ok, has the country owner reset his capital yet after it was sacked? */
|
else
|
||||||
if (np->nat_flags & NF_SACKED)
|
player->nstat |= CAP;
|
||||||
player->nstat &= ~CAP; /* No capital yet */
|
|
||||||
}
|
}
|
||||||
delta = 0;
|
delta = 0;
|
||||||
if ((player->nstat & CAP) || player->god) {
|
if ((player->nstat & CAP) || player->god) {
|
||||||
|
|
|
@ -214,14 +214,10 @@ status(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getsect(natp->nat_xcap, natp->nat_ycap, §);
|
getsect(natp->nat_xcap, natp->nat_ycap, §);
|
||||||
if ((sect.sct_type == SCT_CAPIT || sect.sct_type == SCT_MOUNT ||
|
if (influx(natp))
|
||||||
sect.sct_type == SCT_SANCT) && sect.sct_own == player->cnum)
|
|
||||||
player->nstat |= CAP;
|
|
||||||
else
|
|
||||||
player->nstat &= ~CAP;
|
player->nstat &= ~CAP;
|
||||||
/* Ok, has the country owner reset his capital yet after it was sacked? */
|
else
|
||||||
if (natp->nat_flags & NF_SACKED)
|
player->nstat |= CAP;
|
||||||
player->nstat &= ~CAP; /* No capital yet */
|
|
||||||
player->ncomstat = player->nstat;
|
player->ncomstat = player->nstat;
|
||||||
time(&player->curup);
|
time(&player->curup);
|
||||||
minute = (player->curup - player->lasttime) / 60;
|
minute = (player->curup - player->lasttime) / 60;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue