diff options
author | michi_cc <michi_cc@openttd.org> | 2011-08-03 20:55:08 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2011-08-03 20:55:08 +0000 |
commit | 08b7981f37431f57ca2fa8dd25db4088c7c69d4e (patch) | |
tree | d55fa560c79768b03077cb544552875e8064d17e /src/aircraft_cmd.cpp | |
parent | 442b92ff33c31317f77786f23539c2566f8252f3 (diff) | |
download | openttd-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.cpp | 5 |
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); } |