The call was added in 4.2.5 "so that the next telegram is flagged as
new and not part of the update". Since the update sends only
TEL_UPDATE telegrams (the previous commit restored that property), and
nothing else does, the next telegram is flagged as new automatically,
except when it's from the next update. Document that, and move the
call to a more natural place.
int n;
int i;
struct bp *bp;
int n;
int i;
struct bp *bp;
struct natstr *np;
logerror("production update (%d etus)", etu);
getrusage(RUSAGE_SELF, &rus1);
game_record_update(time(NULL));
journal_update(etu);
struct natstr *np;
logerror("production update (%d etus)", etu);
getrusage(RUSAGE_SELF, &rus1);
game_record_update(time(NULL));
journal_update(etu);
+ /* Ensure back-to-back production reports are separate: */
+ for (n = 0; n < MAXNOC; n++)
+ clear_telegram_is_new(n);
/* First, make sure all mobility is updated correctly. */
if (opt_MOB_ACCESS) {
/* First, make sure all mobility is updated correctly. */
if (opt_MOB_ACCESS) {
delete_old_announcements();
delete_old_news();
delete_old_lostitems();
delete_old_announcements();
delete_old_news();
delete_old_lostitems();
- /* Clear all the telegram flags */
- for (cn = 0; cn < MAXNOC; cn++)
- clear_telegram_is_new(cn);
getrusage(RUSAGE_SELF, &rus2);
logerror("End update %g user %g system",
rus2.ru_utime.tv_sec + rus2.ru_utime.tv_usec / 1e6
getrusage(RUSAGE_SELF, &rus2);
logerror("End update %g user %g system",
rus2.ru_utime.tv_sec + rus2.ru_utime.tv_usec / 1e6