summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 596e87063..60b0d4222 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -722,11 +722,9 @@ static void EnableEngineForCompany(EngineID eid, CompanyID company)
SetBit(e->company_avail, company);
if (e->type == VEH_TRAIN) {
- assert(e->u.rail.railtype < RAILTYPE_END);
- c->avail_railtypes = AddDateIntroducedRailTypes(c->avail_railtypes | GetRailTypeInfo(e->u.rail.railtype)->introduces_railtypes, _date);
+ c->avail_railtypes = GetCompanyRailtypes(c->index);
} else if (e->type == VEH_ROAD) {
- assert(e->u.road.roadtype < ROADTYPE_END);
- c->avail_roadtypes = AddDateIntroducedRoadTypes(c->avail_roadtypes | GetRoadTypeInfo(e->u.road.roadtype)->introduces_roadtypes, _date);
+ c->avail_roadtypes = GetCompanyRoadTypes(c->index);
}
if (company == _local_company) {