Changeset - r27120:bd1cd079f80f
[Not reviewed]
master
0 1 0
aeonofdiscord - 14 months ago 2023-04-19 09:41:12
alex@aeonofdiscord.com
Fix #10665: CheckEngines should ignore wagons when determining available vehicles at the start date. (#10673)
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/engine.cpp
Show inline comments
 
@@ -1246,6 +1246,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;
 

	
0 comments (0 inline, 0 general)