fix the display of starting gold in the 'Scenario Settings' screen...

...for scenarios which do not set it and rely on the default setting,
it still does not show the right values if the starting gold is
changed by WML later
This commit is contained in:
uso 2008-02-13 02:03:16 +00:00
parent 4c4f802989
commit 98d9afa496

View file

@ -133,14 +133,12 @@ team::team_info::team_info(const config& cfg) :
// at the start of a scenario "start_gold" is not set, we need to take the
// value from the gold setting (or fall back to the gold default)
// this also handles the loading of older save files, though with wrong
// values for the start gold in the scenario settings screen
if (!cfg["start_gold"].empty())
start_gold = cfg["start_gold"];
else if (!gold.empty())
start_gold = gold;
else if (!this->gold.empty())
start_gold = this->gold;
else
start_gold = default_team_gold;
start_gold = str_cast(default_team_gold);
if(team_name.empty()) {
team_name = cfg["side"];