Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OOS in multiplayer when [modify_side] changes a controller during "side_turn_end" event. #2563

Open
gfgtdf opened this issue Feb 26, 2018 · 5 comments

Comments

Projects
None yet
4 participants
@gfgtdf
Copy link
Contributor

commented Feb 26, 2018

if a code like

[modify_side]
  side = $($current_side + 1)
  controller=human
[/modify_side]

is executed during an "side_turn_end" OOS can happen (assumng that side was previously null-controlled)
What happens is that the [end_turn] command is sended to the server before that event is executed and the server updates the current_player_ field when it recieves [end_turn]. So what happens on the server is that a the time when current_player_ filed is updated the next side is skipped becasue it is empty, on the clients however current_side_ is updated after the 'side_turn_end' event has finished so the next side will not be skipped since modify_side activated it.

@gfgtdf gfgtdf added Bug MP labels Feb 26, 2018

@soliton-

This comment has been minimized.

Copy link
Member

commented Feb 27, 2018

Is this likely to happen/be wanted? Perhaps it‘d be enough to document the issue on the wiki.

@gfgtdf

This comment has been minimized.

Copy link
Contributor Author

commented Feb 27, 2018

well before 1.13.2 (2d80c97) we lived fine without support for [modify_side] controller= in mp at all unrelated to in which event it happens, so this is clearly not a blocker. I still think it'd be nice to have it since there is no reason why using it in turn end event would make less sense than in any other event.

I also didn't find any cases in mainline campaign that ere effected by it (i did find a possible invalid [filter] though in https://github.com/wesnoth/wesnoth/blob/1.13.11/data/campaigns/Two_Brothers/scenarios/02_The_Chase.cfg#L423)

EDIT: i just found my first commit that fixes [modify_side] controller= in MP. 6dee136 . It also gives us a testing scenario for this one, just replace side turn with side turn end

@Vultraz

This comment has been minimized.

Copy link
Member

commented Mar 4, 2018

@gfgtdf that filter seems to work fine... odd... the wiki doesn't say [filter] is accepted under [modify_side].

@CelticMinstrel

This comment has been minimized.

Copy link
Member

commented Mar 10, 2018

The filter tag is used to match which sides to modify. Without it it would be impossible to distinguish the filter keys from the change keys.

@CelticMinstrel

This comment has been minimized.

Copy link
Member

commented Mar 10, 2018

(But if there's no filter tag the side key is supposed to be used instead.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.