fixup scenario advancing
the "gamestate().remove_snapshot();" is unneded and would undo the "gamestate().set_snapshot();" in playcampaign
This commit is contained in:
parent
ee7ab9bc69
commit
dd7dca975d
3 changed files with 4 additions and 3 deletions
|
@ -55,6 +55,7 @@ public:
|
|||
|
||||
config& get_starting_pos();
|
||||
config& replay_start() { return replay_start_; }
|
||||
const config& replay_start() const { return replay_start_; }
|
||||
/**
|
||||
* If the game is saved mid-level, we have a series of replay steps
|
||||
* to take the game up to the position it was saved at.
|
||||
|
|
|
@ -653,8 +653,8 @@ void replay_savegame::create_filename()
|
|||
}
|
||||
|
||||
void replay_savegame::write_game(config_writer &out) {
|
||||
gamestate().remove_snapshot();
|
||||
savegame::write_game(out);
|
||||
|
||||
gamestate().write_carryover(out);
|
||||
out.write_child("replay_start", gamestate().replay_start());
|
||||
out.write_child("replay", gamestate().replay_data);
|
||||
|
|
|
@ -131,7 +131,7 @@ protected:
|
|||
void set_error_message(const std::string& error_message) { error_message_ = error_message; }
|
||||
|
||||
const std::string& title() { return title_; }
|
||||
saved_game& gamestate() { return gamestate_; }
|
||||
const saved_game& gamestate() { return gamestate_; }
|
||||
config& snapshot() { return snapshot_; }
|
||||
|
||||
/** If there needs to be some data fiddling before saving the game, this is the place to go. */
|
||||
|
@ -161,7 +161,7 @@ private:
|
|||
/** Throws game::save_game_failed. */
|
||||
scoped_ostream open_save_game(const std::string &label);
|
||||
friend class save_info;
|
||||
|
||||
//before_save (write replay data) changes this so it cannot be const
|
||||
saved_game& gamestate_;
|
||||
|
||||
/** Gamestate information at the time of saving. Note that this object is needed here, since
|
||||
|
|
Loading…
Add table
Reference in a new issue