Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix host reassignes side during choice
Assume the following situation: 2 Players in the game (A (side 1), B (side 2)), and one Observer (C). it's A's turn. A has to do a decision (for example unit advanement), A leaves the game and B decides to assign side 1 to C. On Client B: When returning from process_network_data side 1 is now controlled by B, and then gets then reassigned with the next call of process_network_data, but that's too late becasue handle_generaic_event already returned and B does the advancement decision for side 1. Players C gets the the first [change_controller] (A -> B) and then gets the second change cntroller (B -> C) before getting B's answer to the user choice. So when C gets the second [change_controller] he does the decision himself becasue its C's decision an it has not been received yet. -> the same decision has been made twice -> OOS. this fixes this problem, by making the host wait for the servers change controller in this case
- Loading branch information
Showing
3 changed files
with
42 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters