xna-cncnet-client icon indicating copy to clipboard operation
xna-cncnet-client copied to clipboard

Players' ready status when AutoReady is enabled is not always accurate on host's side.

Open 11EJDE11 opened this issue 10 months ago • 2 comments

This has been mentioned on Discord a few times as of late.

In my experience: It can occur without having started a game. It's just the host that shows the statuses incorrectly. Non hosts it is correct. IIRC, this issue used to crop up even prior to the large client update, just less frequently.

I've done some analysis and can replicate the problem if the host quickly goes from map > null map > map. I think this is what's happening:

When a map change happens, the host queues a Game Options (GO) message to be sent to non-hosts with the new map. If the map is null then the host also resets the ready statuses.

Because the host changed the map quickly, the queue eliminates the first GO message (containing the null map) and only sends the second (containing the valid map).

This results in LastMapChangeWasInvalid not being set to True for non-hosts as the only message they received indicated a valid map. The result of which is they won't send their ready status to the host (who as mentioned, has already reset the ready statuses).

I'm not sure how best to fix. RequestReadyStatus with every map change?

There was a commit that modified LastMapChangeWasInvalid last month. I don't really think that that is to blame. I just think this issue is cropping up more because the client is sending null maps more often (searching for a map with gibberish used to hold the last map, but with recent updates it changes it to null).

11EJDE11 avatar Feb 12 '25 02:02 11EJDE11

If the map is null then the host also resets the ready statuses.

Not sure, but whether it would help if the host does not reset the ready status? For a null map, the client only prevents the host launching the game, without clearing these statuses.

SadPencil avatar Feb 12 '25 07:02 SadPencil

Even if #670 is merged, the null map can still be selected. Such a situation should be tolerated. So I will keep this issue open.

For example, a user without any favorite maps switched the game mode to favorite maps from a regular game mode, with previously a map selected. In this case, a null map is still selected.

SadPencil avatar Feb 19 '25 15:02 SadPencil