summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-01-23 13:06:00 +0000
committersmatz <smatz@openttd.org>2008-01-23 13:06:00 +0000
commita31ebdb2be267edced3b1fdc3a01034f2fa2d2bb (patch)
treee6c4a76d16ee84a8229b65ba5067d23ee93232fc /src
parente35cf20a2360e64bc11f2e1fa282920e73dfdd76 (diff)
downloadopenttd-a31ebdb2be267edced3b1fdc3a01034f2fa2d2bb.tar.xz
(svn r11958) -Fix (r11204): NewAI couldn't build any road vehicles when there were any tram grfs loaded
Diffstat (limited to 'src')
-rw-r--r--src/ai/trolly/build.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ai/trolly/build.cpp b/src/ai/trolly/build.cpp
index 44e03cb07..714d80ab8 100644
--- a/src/ai/trolly/build.cpp
+++ b/src/ai/trolly/build.cpp
@@ -248,6 +248,9 @@ EngineID AiNew_PickVehicle(Player *p)
/* 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;
+ /* Skip trams */
+ if (HasBit(EngInfo(i)->misc_flags, EF_ROAD_TRAM)) continue;
+
// Is it availiable?
// 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;