From 994a06bde695b960a6f263b7e639095f335e048f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Hinrichs?= Date: Tue, 20 Mar 2007 20:26:44 +0000 Subject: [PATCH] fixes bug #8698 (beginning-of-scenario saves don't contain the latest scenario WML) --- src/playcampaign.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/playcampaign.cpp b/src/playcampaign.cpp index ed49a925946..9c09ba4c91b 100644 --- a/src/playcampaign.cpp +++ b/src/playcampaign.cpp @@ -443,7 +443,16 @@ LEVEL_RESULT play_game(display& disp, game_state& state, const config& game_conf //if this isn't the last scenario, then save the game if(save_game_after_scenario) { - state.starting_pos = *scenario; + //For multiplayer, we want the save to contain the starting position. + //For campaings however, this is the start-of-scenario save and the + //starting position needs to be empty to force a reload of the scenario + //config. + if (state.campaign_type == "multiplayer"){ + state.starting_pos = *scenario; + } + else{ + state.starting_pos = config(); + } bool retry = true; @@ -469,9 +478,9 @@ LEVEL_RESULT play_game(display& disp, game_state& state, const config& game_conf } } - //update the replay start - //FIXME: this should only be done if the scenario was not tweaked. - //state.starting_pos = *scenario; + if (state.campaign_type != "multiplayer"){ + state.starting_pos = *scenario; + } } recorder.set_save_info(state);