Fix test for capital in caploss() to check country status
Test for STAT_ACTIVE instead of non-zero country number. Inactive countries have no capital they could lose!
This commit is contained in:
parent
ba5c360ca7
commit
a16af46af9
1 changed files with 2 additions and 2 deletions
|
@ -54,9 +54,9 @@ caploss(struct sctstr *sp, natid coun, char *msg)
|
|||
int loan_num = 0;
|
||||
int comm_num = 0;
|
||||
|
||||
if (coun == 0)
|
||||
return;
|
||||
natp = getnatp(coun);
|
||||
if (natp->nat_stat != STAT_ACTIVE)
|
||||
return;
|
||||
if (sp->sct_x != natp->nat_xcap || sp->sct_y != natp->nat_ycap)
|
||||
return;
|
||||
if (coun == player->cnum)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue