1
0
Fork 0

Fix #10665: CheckEngines should ignore wagons when determining available vehicles at the start date. (#10673)

pull/10922/head
aeonofdiscord 2023-04-19 10:41:12 +01:00 committed by Loïc Guilloux
parent ff7e8c284a
commit e16fcb286a
1 changed files with 3 additions and 0 deletions

View File

@ -1239,6 +1239,9 @@ void CheckEngines()
for (const Engine *e : Engine::Iterate()) {
if (!e->IsEnabled()) continue;
/* Don't consider train wagons, we need a powered engine available. */
if (e->type == VEH_TRAIN && e->u.rail.railveh_type == RAILVEH_WAGON) continue;
/* We have an available engine... yay! */
if ((e->flags & ENGINE_AVAILABLE) != 0 && e->company_avail != 0) return;