From 9be3e8c00e434f513ff62a7ce03425b58deffb6a Mon Sep 17 00:00:00 2001 From: Iurii Chernyi Date: Mon, 7 Sep 2009 13:09:44 +0000 Subject: [PATCH] fix bug with id=foo find_vacant=yes' in [side][unit]... ...causing both a unit recall and a unit create --- src/gamestatus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gamestatus.cpp b/src/gamestatus.cpp index 2c3fe02671d..47a40054b8c 100644 --- a/src/gamestatus.cpp +++ b/src/gamestatus.cpp @@ -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(side); unit un(temp_cfg, false);