(coun_list, repo_list, nati): Replace in-flux determination code with influx().
(influx): New.
This commit is contained in:
parent
d1e2d91961
commit
5ffef496ea
5 changed files with 19 additions and 13 deletions
|
@ -170,3 +170,18 @@ putcontact(struct natstr *np, natid them, int contact)
|
|||
if (np->nat_contact[them] < contact)
|
||||
np->nat_contact[them] = contact;
|
||||
}
|
||||
|
||||
int
|
||||
influx(struct natstr *np)
|
||||
{
|
||||
struct sctstr sect;
|
||||
|
||||
getsect(np->nat_xcap, np->nat_ycap, §);
|
||||
if (sect.sct_own != np->nat_cnum ||
|
||||
(sect.sct_type != SCT_CAPIT && sect.sct_type != SCT_MOUNT &&
|
||||
sect.sct_type != SCT_SANCT) ||
|
||||
(np->nat_flags & NF_SACKED))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue