Merge branch 'master' into jgrpp
# Conflicts: # cmake/CompileFlags.cmake # src/crashlog.cpp # src/fileio.cpp # src/fileio_func.h # src/fios_gui.cpp # src/ini_load.cpp # src/ini_type.h # src/lang/english.txt # src/lang/german.txt # src/lang/korean.txt # src/network/network_client.cpp # src/order_base.h # src/order_cmd.cpp # src/os/windows/win32.cpp # src/road_cmd.cpp # src/saveload/saveload.cpp # src/saveload/saveload.h # src/settings.cpp # src/station_cmd.cpp # src/stdafx.h # src/table/settings.ini # src/tree_cmd.cpp # src/tree_gui.cpp # src/vehicle_base.h # src/video/cocoa/cocoa_v.mm # src/video/cocoa/event.mm # src/video/cocoa/wnd_quartz.mm # src/viewport.cpp # src/widgets/tree_widget.h
This commit is contained in:
@@ -97,6 +97,8 @@ struct AIListWindow : public Window {
|
||||
this->selected = i;
|
||||
break;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -324,8 +326,6 @@ struct AISettingsWindow : public Window {
|
||||
this->vscroll = this->GetScrollbar(WID_AIS_SCROLLBAR);
|
||||
this->FinishInitNested(slot); // Initializes 'this->line_height' as side effect.
|
||||
|
||||
this->SetWidgetDisabledState(WID_AIS_RESET, _game_mode != GM_MENU && Company::IsValidID(this->slot));
|
||||
|
||||
this->RebuildVisibleSettings();
|
||||
}
|
||||
|
||||
@@ -533,10 +533,8 @@ struct AISettingsWindow : public Window {
|
||||
break;
|
||||
|
||||
case WID_AIS_RESET:
|
||||
if (_game_mode == GM_MENU || !Company::IsValidID(this->slot)) {
|
||||
this->ai_config->ResetSettings();
|
||||
this->SetDirty();
|
||||
}
|
||||
this->ai_config->ResetEditableSettings(_game_mode == GM_MENU || ((this->slot != OWNER_DEITY) && !Company::IsValidID(this->slot)));
|
||||
this->SetDirty();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,8 +32,7 @@ void AIScannerInfo::Initialize()
|
||||
ScriptAllocatorScope alloc_scope(this->engine);
|
||||
|
||||
/* Create the dummy AI */
|
||||
free(this->main_script);
|
||||
this->main_script = stredup("%_dummy");
|
||||
this->main_script = "%_dummy";
|
||||
extern void Script_CreateDummyInfo(HSQUIRRELVM vm, const char *type, const char *dir);
|
||||
Script_CreateDummyInfo(this->engine->GetVM(), "AI", "ai");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user