Skip to content

Commit

Permalink
fixup a subtle problem in the replay_controller reset procedure
Browse files Browse the repository at this point in the history
You can see that this must be done by reading display.cpp and
looking at the similar editor code that switches map contexts.
  • Loading branch information
cbeck88 committed Jun 10, 2014
1 parent 2b9fc97 commit 6fe8727
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/replay_controller.cpp
Expand Up @@ -308,6 +308,9 @@ void replay_controller::reset_replay()
recorder.set_skip(false);
gamestate_ = gamestate_start_;
gameboard_ = gameboard_start_;
gui_->change_display_context(&gameboard_); //this doesn't change the pointer value, but it triggers the gui to update the internal terrain builder object,
//idk what the consequences of not doing that are, but its probably a good idea to do it, esp. if layout
//of game_board changes in the future
if (events_manager_ ){
// NOTE: this double reset is required so that the new
// instance of game_events::manager isn't created before the
Expand Down

0 comments on commit 6fe8727

Please sign in to comment.