mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-03 21:06:58 +00:00
(svn r19647) -Fix [FS#3768]: trains loaded above the original IDs didn't have a default railtypelabel assigned to them, causing them to be unavailable
This commit is contained in:
parent
6bed219677
commit
7a3b6f1588
@ -404,6 +404,9 @@ static Engine *GetNewEngine(const GRFFile *file, VehicleType type, uint16 intern
|
||||
size_t len = (Engine::GetPoolSize() - engine_pool_size) * sizeof(*_gted);
|
||||
memset(_gted + engine_pool_size, 0, len);
|
||||
}
|
||||
if (type == VEH_TRAIN) {
|
||||
_gted[e->index].railtypelabel = GetRailTypeInfo(e->u.rail.railtype)->label;
|
||||
}
|
||||
|
||||
grfmsg(5, "Created new engine at index %d for GRFID %x, type %d, index %d", e->index, BSWAP32(file->grfid), type, internal_id);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user