fixup "make level reflect start of scenario"

we change set_attr to set_attr_dup as gfgtdf pointed out
This commit is contained in:
Chris Beck 2014-04-18 20:25:33 -04:00
parent 4de900f943
commit 4aa14aa24a

View File

@ -539,11 +539,11 @@ void game::change_controller(const size_t side_num,
if (started_) { //this is added instead of the if (started_) {...} below
simple_wml::document *record = new simple_wml::document;
simple_wml::node& recchg = record->root().add_child("record_change_controller");
recchg.set_attr("side", side.c_str());
recchg.set_attr("player", player_name.c_str());
recchg.set_attr("controller", (side_controllers_[side_num] == "ai" ? "network_ai" : "network"));
recchg.set_attr_dup("side", side.c_str());
recchg.set_attr_dup("player", player_name.c_str());
recchg.set_attr_dup("controller", (side_controllers_[side_num] == "ai" ? "network_ai" : "network"));
record_data(record);
record_data(record); //the purpose of these records is so that observers, replay viewers, get controller updates correctly
}
// Tell the new player that he controls this side now.