Older savegames don't have random seed stored,
...make sure we can still load them. The problem was discovered by Zoltic.
This commit is contained in:
parent
a23b02fade
commit
ab6ac6d60f
1 changed files with 3 additions and 1 deletions
|
@ -448,7 +448,9 @@ game_state::game_state(const game_data& data, const config& cfg) :
|
|||
last_selected(gamemap::location::null_location),
|
||||
variables(),
|
||||
temporaries(),
|
||||
random_seed_(lexical_cast<int>(cfg["random_seed"])),
|
||||
//! @todo older savegames don't have random_seed stored, evaluate later
|
||||
//! whether default can be removed again. Look after branching 1.5.
|
||||
random_seed_(lexical_cast_default<int>(cfg["random_seed"], 42)),
|
||||
random_pool_(random_seed_),
|
||||
random_calls_(0)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue