The server half of the reliable-event fix the owner approved ("yeah i guess that should be fixed"). Network protocol unchanged (42); demos unaffected.
Reliable events: the oldest one always gets its room (src/game/server.cpp sendSnapshots)
- Before:
- Reliable events (kill feed, chat, names, ranked tickets, map edits) fill whatever room a snapshot has left after the world part.
- An event that didn't fit waited for a roomier snapshot, while smaller ones behind it still went.
- With paced resends, a later event could therefore arrive first. The client acked past the missing one, so that one was lost for good.
- The client half (separate change): the client takes events in id order and acks only up to the last one with nothing missing before it. But then a big event (up to 265 bytes) that kept not fitting would hold back every later event for that client.
- Now:
- When the oldest unacked event is due (never sent, or a round trip without an ack) and doesn't fit after the world part, that snapshot carries fewer projectiles: the list is halved until the event fits, the same way an overflowing world is trimmed.
- The packet is then rebuilt with the shorter world.
- The other events still fill what's left, as before.
- Cost: none in the normal case. It only acts when a crowded snapshot (many players and projectiles) meets a big event. Hidden or trimmed projectiles come back in the next snapshot.
- Tests: netcode, server, hidden, sessions and weapons groups pass.