diff options
author | maedhros <maedhros@openttd.org> | 2007-06-01 12:03:10 +0000 |
---|---|---|
committer | maedhros <maedhros@openttd.org> | 2007-06-01 12:03:10 +0000 |
commit | 4acf3e4c3f4aebf66b82cc1d33aab221d27d800c (patch) | |
tree | ecdd71bd76175d9e15732fad8068a2c2abcb1de2 /src/economy.cpp | |
parent | ab8503f5a5a377a38b6a0ce36a6170c4f83c6b37 (diff) | |
download | openttd-4acf3e4c3f4aebf66b82cc1d33aab221d27d800c.tar.xz |
(svn r10009) -Codechange: Add and use Vehicle::IsPrimaryVehicle to replace individual checks depending on the vehicle type.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r-- | src/economy.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/economy.cpp b/src/economy.cpp index d57cf5314..dbec59eca 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -117,10 +117,7 @@ int UpdateCompanyRatingAndValue(Player *p, bool update) FOR_ALL_VEHICLES(v) { if (v->owner != owner) continue; - if ((v->type == VEH_TRAIN && IsFrontEngine(v)) || - v->type == VEH_ROAD || - (v->type == VEH_AIRCRAFT && IsNormalAircraft(v)) || - v->type == VEH_SHIP) { + if (IsPlayerBuildableVehicleType(v->type) && v->IsPrimaryVehicle()) { num++; if (v->age > 730) { /* Find the vehicle with the lowest amount of profit */ |