Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Even if the fix is simple, the issue was quite complicated :)
Issue:
For zones, we expected that the zone ids are always is sync. The id is selected using a randomizer with the segment id as a seed. Since the segment id is synchronized, the zone ids should be, too. The randomizer selects an item from the "free zone ids" list. The problem is now that the "free zone ids" list is not sync, even if the selected index of this list is. This is caused due to the list being initialized differently when the game is loaded from a savegame than it is during the game.
The issue happens for example when one player builds a street while no one is connected yet. A newly joining player (or a player that typed /sync) now gets the current game state as a savegame and thus initializes the "free zone ids" list differently. When a new street is built, the selected zone ids differ on both games and the zones are no longer in sync.
The fix:
Just sync the actual selected zone ids.
Notes: