mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-22 11:44:17 +01:00
Codechange: Store GRFConfig parameters in a vector. (#13137)
All GRFConfigs have space allocated for parameters, but only configured GRFConfigs need them. Using a vector instead means that space is only used when parameters are used.
This commit is contained in:
@@ -814,7 +814,7 @@ struct GameOptionsWindow : Window {
|
||||
auto *used_set = BaseGraphics::GetUsedSet();
|
||||
if (used_set == nullptr || !used_set->IsConfigurable()) break;
|
||||
GRFConfig &extra_cfg = used_set->GetOrCreateExtraConfig();
|
||||
if (extra_cfg.num_params == 0) extra_cfg.SetParameterDefaults();
|
||||
if (extra_cfg.param.empty()) extra_cfg.SetParameterDefaults();
|
||||
OpenGRFParameterWindow(true, &extra_cfg, _game_mode == GM_MENU);
|
||||
if (_game_mode == GM_MENU) this->reload = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user