ai.c
changeset 538 24fdb517fbe5
parent 536 03d80fecb999
child 539 7e16a61c51ce
equal deleted inserted replaced
537:901bd4c077f0 538:24fdb517fbe5
   119 	byte best_veh_score = 0;
   119 	byte best_veh_score = 0;
   120 	int32 r;
   120 	int32 r;
   121 	int i;
   121 	int i;
   122 
   122 
   123 	for (i = 0; i < NUM_TRAIN_ENGINES; i++) {
   123 	for (i = 0; i < NUM_TRAIN_ENGINES; i++) {
   124 		RailVehicleInfo *rvi = &rail_vehinfo(i);
   124 		const RailVehicleInfo *rvi = rail_vehinfo(i);
   125 		Engine *e = DEREF_ENGINE(i);
   125 		Engine *e = DEREF_ENGINE(i);
   126 
   126 
   127 		if (e->railtype != railtype || rvi->flags & RVI_WAGON
   127 		if (e->railtype != railtype || rvi->flags & RVI_WAGON
   128 		    || !HASBIT(e->player_avail, _current_player) || e->reliability < 0x8A3D)
   128 		    || !HASBIT(e->player_avail, _current_player) || e->reliability < 0x8A3D)
   129 			continue;
   129 			continue;