From 58ffe135dd9c25ad075aa39ee98d0f05c138124b Mon Sep 17 00:00:00 2001 From: Thomas Baumhauer Date: Sun, 14 Jan 2007 08:50:21 +0000 Subject: [PATCH] Hopefully fixing bug #8263 (Random events broken in HttT - Crossroads) --- src/game_events.cpp | 4 ++-- src/replay.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game_events.cpp b/src/game_events.cpp index 5d426ad53ce..ec38cd0ca21 100644 --- a/src/game_events.cpp +++ b/src/game_events.cpp @@ -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; diff --git a/src/replay.cpp b/src/replay.cpp index 661f7fa965e..d3ce5ff00f9 100644 --- a/src/replay.cpp +++ b/src/replay.cpp @@ -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)