Changeset - r11177:50cf56a92a1b
[Not reviewed]
master
0 1 0
yexo - 15 years ago 2009-02-20 00:02:25
yexo@openttd.org
(svn r15528) -Fix (r15525): Check should be the other way around (thanks SmatZ).
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/saveload/ai_sl.cpp
Show inline comments
 
@@ -49,25 +49,25 @@ static void SaveReal_AIPL(int *index_ptr
 
static void Load_AIPL()
 
{
 
	/* Free all current data */
 
	for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) {
 
		AIConfig::GetConfig(c)->ChangeAI(NULL);
 
	}
 

	
 
	CompanyID index;
 
	while ((index = (CompanyID)SlIterateArray()) != (CompanyID)-1) {
 
		_ai_saveload_version = -1;
 
		SlObject(NULL, _ai_company);
 

	
 
		if (!_networking || _network_server) {
 
		if (_networking && !_network_server) {
 
			AIInstance::LoadEmpty();
 
			continue;
 
		}
 

	
 
		AIConfig *config = AIConfig::GetConfig(index);
 
		if (StrEmpty(_ai_saveload_name)) {
 
			/* A random AI. */
 
			config->ChangeAI(NULL);
 
		} else {
 
			config->ChangeAI(_ai_saveload_name, _ai_saveload_version);
 
			if (!config->HasAI()) {
 
				if (strcmp(_ai_saveload_name, "%_dummy") != 0) {
0 comments (0 inline, 0 general)