Skip to content

Commit

Permalink
Prevent campaign difficulty influencing skirmish in-game saveload
Browse files Browse the repository at this point in the history
Loading skirmish saves from in-game would have bMultiPlayer as false before resetDamageModifiers() was encountered. Thus resulting in the campaign difficulty modifiers the player currently has set to override the expected damage modifiers for skirmish/mp.
  • Loading branch information
KJeff01 committed Nov 6, 2023
1 parent 4aaf5ec commit e65aa09
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4644,6 +4644,10 @@ static bool loadMainFile(const std::string &fileName)
{
game.playerLeaveMode = static_cast<PLAYER_LEAVE_MODE>(save.value("playerLeaveMode").toInt());
}
if (save.contains("multiplayer"))
{
bMultiPlayer = save.value("multiplayer").toBool();
}

save.beginArray("players");
while (save.remainingArrayItems() > 0)
Expand Down

0 comments on commit e65aa09

Please sign in to comment.