}
}
}
- /* Age contact */
- if (opt_LOSE_CONTACT) {
- for (cn = 1; cn < MAXNOC; cn++) {
- if ((cnp = getnatp(cn)) != NULL)
- agecontact(cnp);
- }
- }
/* Only update mobility for non-MOB_ACCESS here, since it doesn't
get done for MOB_ACCESS anyway during the update */
if (!opt_MOB_ACCESS) {
double res[MAXNOC];
double newvalue;
natid n;
- int cn, cont;
+ int cn;
+ struct natstr *cnp;
for (n = 0; NULL != (np = getnatp(n)); n++) {
if ((np->nat_stat & STAT_NORM) == 0)
wu((natid)0, n, "money delta was $%ld for this update\n",
np->nat_money - money[n]);
if (opt_LOSE_CONTACT) {
- for (cn = 0; cn <= MAXNOC; cn++) {
- cont = getcontact(np, cn);
- if (cont > 0) {
- logerror("country %d at level %d with country %d.\n",
- n, cont, cn);
- setcont(n, cn, cont - 1);
- }
+ for (cn = 1; cn < MAXNOC; cn++) {
+ if ((cnp = getnatp(cn)) != NULL)
+ agecontact(cnp);
}
}
}