Skip to content

Commit

Permalink
fix 25473
Browse files Browse the repository at this point in the history
[ci_skip]
  • Loading branch information
gfgtdf committed Jan 29, 2017
1 parent ee7ea31 commit ccdb05c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/replay.cpp
Expand Up @@ -404,14 +404,22 @@ config replay::get_data_range(int cmd_start, int cmd_end, DATA_TYPE data_type)
return res;
}

void replay::redo(const config& cfg)
void replay::redo(const config& cfg, bool set_to_end)
{
assert(base_->get_pos() == ncommands());
int old_pos = base_->get_pos();
for (const config &cmd : cfg.child_range("command"))
{
base_->add_child() = cmd;
}
base_->set_to_end();
if(set_to_end) {
//The engine does not execute related wml events so mark ad dpendent actions as handled
base_->set_to_end();
}
else {
//The engine does execute related wml events so it needs to reprocess depndent choices
base_->set_pos(old_pos + 1);
}

}

Expand Down

0 comments on commit ccdb05c

Please sign in to comment.