summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-08-22 21:33:58 +0000
committerfrosch <frosch@openttd.org>2011-08-22 21:33:58 +0000
commit28117b3eb09f71288f4aef2b72c63e4203b4bb71 (patch)
tree506335068e16991ce8e8c62a0bf8c6cd99d514db /src/roadveh_cmd.cpp
parent3957f428b15cb3bcdcbc451be423ef391a98d81a (diff)
downloadopenttd-28117b3eb09f71288f4aef2b72c63e4203b4bb71.tar.xz
(svn r22816) -Feature(ette): [NewGRF] Also age wagons and articulated parts.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 672c6e426..15c2bf49a 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1591,12 +1591,13 @@ static void CheckIfRoadVehNeedsService(RoadVehicle *v)
void RoadVehicle::OnNewDay()
{
+ AgeVehicle(this);
+
if (!this->IsFrontEngine()) return;
if ((++this->day_counter & 7) == 0) DecreaseVehicleValue(this);
if (this->blocked_ctr == 0) CheckVehicleBreakdown(this);
- AgeVehicle(this);
CheckIfRoadVehNeedsService(this);
CheckOrders(this);