mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-09 15:59:00 +00:00
fix bug with id=foo find_vacant=yes' in [side][unit]...
...causing both a unit recall and a unit create
This commit is contained in:
parent
c3c540eddf
commit
9be3e8c00e
@ -672,7 +672,7 @@ void game_state::build_team(const config& side_cfg,
|
||||
//take recall list from [player] tag and update the side number of its units
|
||||
if (player_cfg != NULL) {
|
||||
foreach(const config &u, (*player_cfg).child_range("unit")) {
|
||||
if (u["x"].empty() && u["y"].empty()) {
|
||||
if (u["x"].empty() && u["y"].empty() && !utils::string_bool(u["find_vacant"],false)) {
|
||||
config temp_cfg(u); //copy ctor, as player_cfg is const
|
||||
temp_cfg["side"] = str_cast<int>(side);
|
||||
unit un(temp_cfg, false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user