Skip to content

Commit

Permalink
Clear the list of scenario content before getting the next list of co…
Browse files Browse the repository at this point in the history
…ntent.

Otherwise each scenario keeps appending additional and usually duplicate content being sent to the server.
  • Loading branch information
Pentarctagon committed Feb 24, 2021
1 parent 387f4ae commit 6c980d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/game_initialization/playcampaign.cpp
Expand Up @@ -361,8 +361,11 @@ LEVEL_RESULT campaign_controller::play_game()
return LEVEL_RESULT::QUIT;
}

// The host should send the complete savegame now that also contains the carryvoer sides start.
// The host should send the complete savegame now that also contains the carryover sides start.
} else {
// clear previous game content information
// otherwise it keeps getting appended for each scenario resulting in incorrect data being sent to the server to be stored
state_.mp_settings().addons.clear();
// Retrieve next scenario data.
state_.expand_scenario();

Expand Down
2 changes: 1 addition & 1 deletion src/saved_game.cpp
Expand Up @@ -380,7 +380,7 @@ void saved_game::expand_mp_events()
);

// We don't want the error message below if there is no era (= if this is a sp game).
if(!classification_.era_id .empty()) {
if(!classification_.era_id.empty()) {
mods.emplace_back("era", classification_.era_id);
}

Expand Down

0 comments on commit 6c980d1

Please sign in to comment.