[Commits] [wesnoth/wesnoth] 43b3c9: MP Lobby: fixed being prompted to download non-req...

GitHub noreply at github.com
Thu Feb 15 03:39:58 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 43b3c9ac3538a28bccc7e480773bb7732ef50b62
      https://github.com/wesnoth/wesnoth/commit/43b3c9ac3538a28bccc7e480773bb7732ef50b62
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2018-02-15 (Thu, 15 Feb 2018)

  Changed paths:
    M src/game_initialization/lobby_data.cpp

  Log Message:
  -----------
  MP Lobby: fixed being prompted to download non-required addons when joining a game.

Fixes #2476.

It turns out I had implemented 09f919e65e4f070a69df3c5404dc40c154b91276 incorrectly.
All required addons, including those needed for modifications, were already added
to the game's config by the host before being sent to the server. There was no need
to parse the active list of modifications separately. I appear to have confused the
idea of addon type vs the modification itself and assumed one always equaled to the
other. Which is wrong. For example, you may have multiple mods active from the same
addon.


  Commit: 09906135b5604a372db967c41508a72fb881f814
      https://github.com/wesnoth/wesnoth/commit/09906135b5604a372db967c41508a72fb881f814
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2018-02-15 (Thu, 15 Feb 2018)

  Changed paths:
    M src/scripting/game_lua_kernel.cpp

  Log Message:
  -----------
  Refactor wesnoth.set_village_owner implementation

@gfgtdf pointed out that I didn't actually fix the underlying porblem that was causing
#2505 in 3e9654c3e408: 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.


Compare: https://github.com/wesnoth/wesnoth/compare/89ad67bb8a6e...09906135b560


More information about the Commits mailing list