# HG changeset patch # User yexo # Date 1271495546 0 # Node ID 9cc282ac85193ceb43dc37e5d9042836496b2b2b # Parent 13f366082b6bc9560509075b2ed0d4356c55fcd8 (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 diff --git a/src/newgrf.cpp b/src/newgrf.cpp --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -404,6 +404,9 @@ 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);