Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor wesnoth.set_village_owner implementation
@gfgtdf pointed out that I didn't actually fix the underlying porblem that was causing #2505 in 3e9654c: if new_side was 0, board().team_is_defeated(board().get_team(new_side)) would throw an out-of-range exception and the village would never be un-assigned from the old side. I'm totally refactored the function to be easier to understand and match the desired behavior.
- Loading branch information