wb: dont send delete of actions of other sides

This commit is contained in:
gfgtdf 2018-06-14 18:43:52 +02:00 committed by Charles Dang
parent 4bda3e7311
commit ee00b88427

View file

@ -563,7 +563,18 @@ side_actions::iterator side_actions::remove_action(side_actions::iterator positi
LOG_WB << "Erasing action at turn #" << get_turn(position) << " position #" << actions_.position_in_turn(position) << "\n";
position = synced_erase(position);
if(resources::gameboard->get_team(team_index_ + 1).is_local()) {
position = synced_erase(position);
}
else {
// don't sync actions of sides that we don't control, this would only generate
// 'illegal whiteboard data' server wanrings.
// it might be better to instead don't even erase the action in this case to keep
// the actionlist in sync with the owner client.
position = safe_erase(position);
}
if(validate_after_delete) {
resources::whiteboard->validate_viewer_actions();