Merge branch 'master' into jgrpp
# Conflicts: # cmake/CompileFlags.cmake # src/crashlog.cpp # src/crashlog.h # src/date_type.h # src/depot_type.h # src/landscape.cpp # src/openttd.cpp # src/order_cmd.cpp # src/order_gui.cpp # src/os/macosx/crashlog_osx.cpp # src/os/unix/crashlog_unix.cpp # src/os/windows/crashlog_win.cpp # src/pathfinder/npf/npf.cpp # src/road_cmd.cpp # src/script/api/script_infrastructure.cpp # src/stdafx.h # src/table/settings/gui_settings.ini # src/table/settings/pathfinding_settings.ini # src/tests/CMakeLists.txt
This commit is contained in:
@@ -2426,9 +2426,11 @@ void AgeVehicle(Vehicle *v)
|
||||
if (!v->IsPrimaryVehicle() && (v->type != VEH_TRAIN || !Train::From(v)->IsEngine())) return;
|
||||
|
||||
int age = v->age - v->max_age;
|
||||
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;
|
||||
for (int i = 0; i <= 4; i++) {
|
||||
if (age == DateAtStartOfYear(i)) {
|
||||
v->reliability_spd_dec <<= 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SetWindowDirty(WC_VEHICLE_DETAILS, v->index);
|
||||
|
Reference in New Issue
Block a user