(coun_list, repo_list, nati): Replace in-flux determination code with influx().

(influx): New.
This commit is contained in:
Ron Koenderink 2005-12-17 20:18:54 +00:00
parent d1e2d91961
commit 5ffef496ea
5 changed files with 19 additions and 13 deletions

View file

@ -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, &sect);
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;
}