Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fixup ready block #148

Closed
wants to merge 5 commits into
from

Conversation

Projects
None yet
1 participant
Member

cbeck88 commented Apr 14, 2014

*** Experimental ***

gfgtdf reports a bug, where when a reloaded game is hosted, if a reserved side is replaced manually with a network player, the ready button blocks "waiting for faction..." even though no one is choosing a faction.

This is relevant to my earlier commit: 186e66c

I believe that I tested this and it worked at an earlier version, nevertheless after reviewing the code I decided that I should try to make exactly the same test on the host as is used by the client when deciding whether to show the faction selection dialog, instead of what I was using which now seems to me as a hack. Specifically that means I should test whether "allow_changes = true".

Here's where the plot thickens. That doesn't fix the issue, and indeed debugging output inserted in the subsequent commits here shows that the host and clients don't actually agree about the value of "allow_changes" for the joining player! I have also made server-side debugging output to show exactly what the game config being passed to the clients is. It looks that it might be an issue that one side is perhaps reading from "snapshot" and the other from replay_start or some such thing? Anyways if anyone has an idea why they might be out of sync regarding "allow_changes" it would be helpful, I'm going to put this aside for a few days and perhaps come back to it.

Also: possibly relevant to fa5b916

cbeck88 added some commits Apr 14, 2014

add debugging output to server and waiting client
server shows level when the game starts, on debug channel
mp client which is waiting shows allow_changes value
fix bug #21916, ready blocked at inappropriate times
the problem was that params.saved_game was checked at the wrong time,
it was checked at the time of making a new config, but not in the
constructor. the result is that the host and clients are out of sync
about whether allow_changes is true for a given side.
Member

cbeck88 commented Apr 18, 2014

I actually rebased this and merged it later.

@cbeck88 cbeck88 closed this Apr 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment