[wesnoth-commits] [wesnoth/wesnoth] 028401: Editor: fixed village counter possibly being incor...

GitHub noreply at github.com
Sat Feb 24 10:58:03 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 028401518b85c5e40058f29b58569d9fe675519a
      https://github.com/wesnoth/wesnoth/commit/028401518b85c5e40058f29b58569d9fe675519a
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2018-02-24 (Sat, 24 Feb 2018)

  Changed paths:
    M src/editor/map/editor_map.cpp
    M src/map/map.hpp

  Log Message:
  -----------
  Editor: fixed village counter possibly being incorrect after resizing map (fixes #1390)

On looking into this, it turns out the [replace_map] WML action totally clears the village vector
and repopulates it from the new map. That's why it was reported didn't affect that tag. The editor,
OTHO, actually resizes the map, not recreates it.

I decided to use @wedge009 's solution described in the bug above and manually remove off-map
villages from the map's village vector. Something must also have changed in the past two years
since he attempted his fix, since the theme counter now immediately displays the correct value.

As for the issue he raised about villages on the map border, I they're simply ignored. Villages
placed there when you're drawing a map are not counted anyway, and with this change they are
correctly removed from the village count.




More information about the Commits mailing list