1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 18:02:37 +01:00

Fix: disable_elrails handling with engines that use both RAIL and ELRL (#15045)

This commit is contained in:
Jonathan G Rennison
2026-01-05 20:23:05 +00:00
committed by GitHub
parent 710c78a0bb
commit fed2149846

View File

@@ -586,7 +586,7 @@ void UpdateDisableElrailSettingState(bool disable, bool update_vehicles)
/* update railtype of engines intended to use elrail */
if (rv_info->intended_railtypes.Test(RAILTYPE_ELECTRIC)) {
rv_info->railtypes.Set(RAILTYPE_ELECTRIC, !disable);
rv_info->railtypes.Set(RAILTYPE_RAIL, disable);
rv_info->railtypes.Set(RAILTYPE_RAIL, disable || rv_info->intended_railtypes.Test(RAILTYPE_RAIL));
}
}