Skip to content

Commit

Permalink
simplyfy level_to_gamestate
Browse files Browse the repository at this point in the history
most liley level_to_gamestate is currently broken since the latest
saved_game changes, but this commit doesn't change anything
  • Loading branch information
gfgtdf committed Jun 15, 2014
1 parent 5ec441a commit 33504a7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/mp_game_utils.cpp
Expand Up @@ -166,13 +166,11 @@ void level_to_gamestate(config& level, saved_game& state)
{
// Any replay data is only temporary and should be removed from
// the level data in case we want to save the game later.
const config& replay_data = level.child("replay");
config replay_data_store;
if (replay_data) {
replay_data_store = replay_data;
if (const config& replay_data = level.child("replay"))
{
LOG_NW << "setting replay\n";
state.replay_data = replay_data;
recorder = replay(replay_data_store);
recorder = replay(replay_data);
if (!recorder.empty()) {
recorder.set_skip(false);
recorder.set_to_end();
Expand Down

0 comments on commit 33504a7

Please sign in to comment.