File diff r25406:017a9f8d3ec9 → r25407:b37c2c854ce5
src/saveload/ai_sl.cpp
Show inline comments
 
@@ -89,25 +89,25 @@ static void Load_AIPL()
 
				if (!config->HasScript()) {
 
					if (strcmp(_ai_saveload_name, "%_dummy") != 0) {
 
						DEBUG(script, 0, "The savegame has an AI by the name '%s', version %d which is no longer available.", _ai_saveload_name, _ai_saveload_version);
 
						DEBUG(script, 0, "A random other AI will be loaded in its place.");
 
					} else {
 
						DEBUG(script, 0, "The savegame had no AIs available at the time of saving.");
 
						DEBUG(script, 0, "A random available AI will be loaded now.");
 
					}
 
				} else {
 
					DEBUG(script, 0, "The savegame has an AI by the name '%s', version %d which is no longer available.", _ai_saveload_name, _ai_saveload_version);
 
					DEBUG(script, 0, "The latest version of that AI has been loaded instead, but it'll not get the savegame data as it's incompatible.");
 
				}
 
				/* Make sure the AI doesn't get the saveload data, as he was not the
 
				/* Make sure the AI doesn't get the saveload data, as it was not the
 
				 *  writer of the saveload data in the first place */
 
				_ai_saveload_version = -1;
 
			}
 
		}
 

	
 
		config->StringToSettings(_ai_saveload_settings);
 

	
 
		/* Start the AI directly if it was active in the savegame */
 
		if (Company::IsValidAiID(index)) {
 
			AI::StartNew(index, false);
 
			AI::Load(index, _ai_saveload_version);
 
		}