[Commits] [wesnoth/wesnoth] cf8654: fix host reassignes side during choice

GitHub noreply at github.com
Mon Apr 14 03:03:24 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: cf865499b92c4651bfe228e38a0495faaa4446f8
      https://github.com/wesnoth/wesnoth/commit/cf865499b92c4651bfe228e38a0495faaa4446f8
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-04-14 (Mon, 14 Apr 2014)

  Changed paths:
    M src/playmp_controller.cpp
    M src/playturn.cpp
    M src/playturn.hpp

  Log Message:
  -----------
  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


  Commit: aa071dd25287e42d4832ce0f70e835a31ee9c3c8
      https://github.com/wesnoth/wesnoth/commit/aa071dd25287e42d4832ce0f70e835a31ee9c3c8
  Author: gfgtdf <tischpapier at gmail.com>
  Date:   2014-04-14 (Mon, 14 Apr 2014)

  Changed paths:
    M src/playmp_controller.cpp
    M src/playturn.cpp
    M src/playturn.hpp

  Log Message:
  -----------
  Merge pull request #147 from gfgtdf/sync_fix_2

fix host reassignes side during choice


Compare: https://github.com/wesnoth/wesnoth/compare/6e3218959939...aa071dd25287


More information about the Commits mailing list