diff src/train_cmd.cpp @ 18007:c7a5373f1a03 draft

(svn r22816) -Feature(ette): [NewGRF] Also age wagons and articulated parts.
author frosch <frosch@openttd.org>
date Mon, 22 Aug 2011 21:33:58 +0000 (2011-08-22)
parents 4d6b4b6d6069
children 0108a6ec2d68
line wrap: on
line diff
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -3778,11 +3778,12 @@
 
 void Train::OnNewDay()
 {
+	AgeVehicle(this);
+
 	if ((++this->day_counter & 7) == 0) DecreaseVehicleValue(this);
 
 	if (this->IsFrontEngine()) {
 		CheckVehicleBreakdown(this);
-		AgeVehicle(this);
 
 		CheckIfTrainNeedsService(this);
 
@@ -3806,9 +3807,6 @@
 			SetWindowDirty(WC_VEHICLE_DETAILS, this->index);
 			SetWindowClassesDirty(WC_TRAINS_LIST);
 		}
-	} else if (this->IsEngine()) {
-		/* Also age engines that aren't front engines */
-		AgeVehicle(this);
 	}
 }