1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-02-01 16:44:34 +01:00

Codechange: remove need for new (address) PoolItem(...)

This commit is contained in:
Rubidium
2026-01-03 16:40:12 +01:00
committed by rubidium42
parent 2e6f8fe191
commit e9e7e4af51
6 changed files with 13 additions and 28 deletions

View File

@@ -71,6 +71,10 @@ static_assert(lengthof(_orig_rail_vehicle_info) + lengthof(_orig_road_vehicle_in
Engine::Engine(EngineID index, VehicleType type, uint16_t local_id) : EnginePool::PoolItem<&_engine_pool>(index)
{
this->type = type;
/* Called in the context of loading a savegame. The rest comes from the loader. */
if (type == VEH_INVALID) return;
this->grf_prop.local_id = local_id;
this->list_position = local_id;
this->preview_company = CompanyID::Invalid();