mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 00:29:05 +00:00
fixup "make level reflect start of scenario"
we change set_attr to set_attr_dup as gfgtdf pointed out
This commit is contained in:
parent
4de900f943
commit
4aa14aa24a
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user