Skip to content

Commit

Permalink
fixup "make level reflect start of scenario"
Browse files Browse the repository at this point in the history
we change set_attr to set_attr_dup as gfgtdf pointed out
  • Loading branch information
cbeck88 committed Apr 19, 2014
1 parent ac2e8ae commit 28a51be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/server/game.cpp
Expand Up @@ -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.
Expand Down

0 comments on commit 28a51be

Please sign in to comment.