mirror of https://github.com/OpenTTD/OpenTTD
(svn r11958) -Fix (r11204): NewAI couldn't build any road vehicles when there were any tram grfs loaded
parent
e35cf20a23
commit
a31ebdb2be
|
@ -248,6 +248,9 @@ EngineID AiNew_PickVehicle(Player *p)
|
||||||
/* Skip vehicles which can't take our cargo type */
|
/* Skip vehicles which can't take our cargo type */
|
||||||
if (rvi->cargo_type != _players_ainew[p->index].cargo && !CanRefitTo(i, _players_ainew[p->index].cargo)) continue;
|
if (rvi->cargo_type != _players_ainew[p->index].cargo && !CanRefitTo(i, _players_ainew[p->index].cargo)) continue;
|
||||||
|
|
||||||
|
/* Skip trams */
|
||||||
|
if (HasBit(EngInfo(i)->misc_flags, EF_ROAD_TRAM)) continue;
|
||||||
|
|
||||||
// Is it availiable?
|
// Is it availiable?
|
||||||
// Also, check if the reliability of the vehicle is above the AI_VEHICLE_MIN_RELIABILTY
|
// Also, check if the reliability of the vehicle is above the AI_VEHICLE_MIN_RELIABILTY
|
||||||
if (!HasBit(e->player_avail, _current_player) || e->reliability * 100 < AI_VEHICLE_MIN_RELIABILTY << 16) continue;
|
if (!HasBit(e->player_avail, _current_player) || e->reliability * 100 < AI_VEHICLE_MIN_RELIABILTY << 16) continue;
|
||||||
|
|
Loading…
Reference in New Issue