summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index f160a3280..3adee9121 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -959,15 +959,18 @@ void AgeVehicle(Vehicle *v)
if (v->age < 65535) v->age++;
int age = v->age - v->max_age;
- if (age == 366 * 0 || age == 366 * 1 || age == 366 * 2 || age == 366 * 3 || age == 366 * 4) v->reliability_spd_dec <<= 1;
+ if (age == DAYS_IN_LEAP_YEAR * 0 || age == DAYS_IN_LEAP_YEAR * 1 ||
+ age == DAYS_IN_LEAP_YEAR * 2 || age == DAYS_IN_LEAP_YEAR * 3 || age == DAYS_IN_LEAP_YEAR * 4) {
+ v->reliability_spd_dec <<= 1;
+ }
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
- if (age == -366) {
+ if (age == -DAYS_IN_LEAP_YEAR) {
ShowVehicleGettingOld(v, STR_01A0_IS_GETTING_OLD);
} else if (age == 0) {
ShowVehicleGettingOld(v, STR_01A1_IS_GETTING_VERY_OLD);
- } else if (age > 0 && (age % 366) == 0) {
+ } else if (age > 0 && (age % DAYS_IN_LEAP_YEAR) == 0) {
ShowVehicleGettingOld(v, STR_01A2_IS_GETTING_VERY_OLD_AND);
}
}