train_gui.c
changeset 5215 b8fb685df4c5
parent 5202 0aea98143b63
child 5273 d9f707aa36a6
equal deleted inserted replaced
5214:62a0325b53c7 5215:b8fb685df4c5
   391 	for (sel_id = INVALID_ENGINE, eid = 0; eid < NUM_TRAIN_ENGINES; eid++) {
   391 	for (sel_id = INVALID_ENGINE, eid = 0; eid < NUM_TRAIN_ENGINES; eid++) {
   392 		const Engine *e = GetEngine(eid);
   392 		const Engine *e = GetEngine(eid);
   393 		const RailVehicleInfo *rvi = RailVehInfo(eid);
   393 		const RailVehicleInfo *rvi = RailVehInfo(eid);
   394 
   394 
   395 		if (bv->filter.railtype != RAILTYPE_END && !HasPowerOnRail(e->railtype, bv->filter.railtype)) continue;
   395 		if (bv->filter.railtype != RAILTYPE_END && !HasPowerOnRail(e->railtype, bv->filter.railtype)) continue;
   396 		if (!IsEngineBuildable(eid, VEH_Train)) continue;
   396 		if (!IsEngineBuildable(eid, VEH_Train, _local_player)) continue;
   397 
   397 
   398 		EngList_Add(&bv->eng_list, eid);
   398 		EngList_Add(&bv->eng_list, eid);
   399 		if ((rvi->flags & RVI_WAGON) == 0) {
   399 		if ((rvi->flags & RVI_WAGON) == 0) {
   400 			num_engines++;
   400 			num_engines++;
   401 		} else {
   401 		} else {