Hopefully fixing bug #8263 (Random events broken in HttT - Crossroads)
This commit is contained in:
parent
4beb3c1a91
commit
58ffe135dd
2 changed files with 3 additions and 3 deletions
|
@ -1009,11 +1009,11 @@ bool event_handler::handle_event_command(const queued_event& event_info,
|
|||
//otherwise get the random value from the replay data
|
||||
else {
|
||||
const config* const action = get_replay_source().get_next_action();
|
||||
if(action == NULL || action->get_children("random").empty()) {
|
||||
if(action == NULL || action->get_children("random_number").empty()) {
|
||||
replay::throw_error("choice expected but none found\n");
|
||||
}
|
||||
|
||||
const std::string& val = (*(action->get_children("random").front()))["value"];
|
||||
const std::string& val = (*(action->get_children("random_number").front()))["value"];
|
||||
random_value = val;
|
||||
}
|
||||
var = random_value;
|
||||
|
|
|
@ -363,7 +363,7 @@ void replay::set_random_value(const std::string& choice)
|
|||
config* const cmd = add_command();
|
||||
config val;
|
||||
val["value"] = choice;
|
||||
cmd->add_child("random",val);
|
||||
cmd->add_child("random_number",val);
|
||||
}
|
||||
|
||||
void replay::add_label(const terrain_label* label)
|
||||
|
|
Loading…
Add table
Reference in a new issue