summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.cpp
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2011-08-03 20:55:08 +0000
committermichi_cc <michi_cc@openttd.org>2011-08-03 20:55:08 +0000
commit08b7981f37431f57ca2fa8dd25db4088c7c69d4e (patch)
treed55fa560c79768b03077cb544552875e8064d17e /src/aircraft_cmd.cpp
parent442b92ff33c31317f77786f23539c2566f8252f3 (diff)
downloadopenttd-08b7981f37431f57ca2fa8dd25db4088c7c69d4e.tar.xz
(svn r22713) -Feature: [NewGRF] Per vehicle custom cargo ageing period.
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index ae80ae7f9..ce969a533 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -549,6 +549,11 @@ void UpdateAircraftCache(Aircraft *v)
/* Use the default max speed of the vehicle. */
v->vcache.cached_max_speed = AircraftVehInfo(v->engine_type)->max_speed;
}
+
+ /* Update cargo aging period. */
+ v->vcache.cached_cargo_age_period = GetVehicleProperty(v, PROP_AIRCRAFT_CARGO_AGE_PERIOD, EngInfo(v->engine_type)->cargo_age_period);
+ Aircraft *u = v->Next(); // Shadow for mail
+ u->vcache.cached_cargo_age_period = GetVehicleProperty(u, PROP_AIRCRAFT_CARGO_AGE_PERIOD, EngInfo(u->engine_type)->cargo_age_period);
}