Simplify how typed_wu() counts telegrams
typed_wu() counts telegrams to update nat_tgms and, since Empire 2, send C_INFORM messages. Adjacent telegrams are squashed together if type and sender are the same, and the timestamp is within TEL_SECONDS. typed_wu() increments nat_tgms when it sends a telegram that read doesn't squash into the previous one. Since Empire 2, it also sends a C_INFORM message then. Inexplicably, it fails to use the same condition: it tests just new_tele, not new_tele || np->nat_tgms == 0. C_INFORM messages got missed, until 4.0.18 made rea() call clear_telegram_is_new(). Convoluted. Send C_INFORM exactly when incrementing nat_tgms, and back out 4.0.18's fix.
This commit is contained in:
parent
a5bcb63b85
commit
a0b82b8d46
2 changed files with 11 additions and 12 deletions
|
@ -99,7 +99,6 @@ rea(void)
|
|||
may_delete = 0;
|
||||
}
|
||||
mbox = mailbox(mbox_buf, num);
|
||||
clear_telegram_is_new(player->cnum);
|
||||
}
|
||||
|
||||
if (!(telfp = fopen(mbox, "rb+"))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue