3 | --- script_config.cpp (revision 27582)
| 3 | --- src/saveload/ai_sl.cpp (revision 27582)
|
---|
4 | +++ script_config.cpp (working copy)
| 4 | +++ src/saveload/ai_sl.cpp (working copy)
|
---|
5 | @@ -23,6 +23,7 @@
| 5 | @@ -83,7 +83,7 @@
|
---|
6 | free(this->name);
| 6 | /* A random AI. */
|
---|
7 | this->name = (name == NULL) ? NULL : stredup(name);
| 7 | config->Change(NULL, -1, false, true);
|
---|
8 | this->info = (name == NULL) ? NULL : this->FindInfo(this->name, version, force_exact_match);
| 8 | } else {
|
---|
9 | + if (this->info != NULL) this->name = (GetInfo()->GetName());
| 9 | - config->Change(_ai_saveload_name, _ai_saveload_version, false, _ai_saveload_is_random);
|
---|
10 | this->version = (info == NULL) ? -1 : info->GetVersion();
| 10 | + config->Change(_ai_saveload_name, -1, true, _ai_saveload_is_random);
|
---|
11 | this->is_random = is_random;
| 11 | if (!config->HasScript()) {
|
---|
12 | if (this->config_list != NULL) delete this->config_list; | 12 | /* No version of the AI available that can load the data. Try to load the
|
---|
| | 13 | * latest version of the AI instead. */
|
---|
| | 14 | Index: src/saveload/game_sl.cpp
|
---|
| | 15 | ===================================================================
|
---|
| | 16 | --- src/saveload/game_sl.cpp (revision 27582)
|
---|
| | 17 | +++ src/saveload/game_sl.cpp (working copy)
|
---|
| | 18 | @@ -75,7 +75,7 @@
|
---|
| | 19 | GameConfig *config = GameConfig::GetConfig(GameConfig::SSS_FORCE_GAME);
|
---|
| | 20 | if (StrEmpty(_game_saveload_name)) {
|
---|
| | 21 | } else {
|
---|
| | 22 | - config->Change(_game_saveload_name, _game_saveload_version, false, _game_saveload_is_random);
|
---|
| | 23 | + config->Change(_game_saveload_name, -1, true, _game_saveload_is_random);
|
---|
| | 24 | if (!config->HasScript()) {
|
---|
| | 25 | /* No version of the GameScript available that can load the data. Try to load the
|
---|
| | 26 | * latest version of the GameScript instead. */ |
---|