Move clear_telegram_is_new() call to beginning of update
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.
This commit is contained in:
parent
d46b168663
commit
ac5dac0690
1 changed files with 3 additions and 4 deletions
|
@ -60,13 +60,15 @@ update_main(void)
|
|||
int n;
|
||||
int i;
|
||||
struct bp *bp;
|
||||
int cn;
|
||||
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) {
|
||||
|
@ -153,9 +155,6 @@ update_main(void)
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue