(svn r22713) -Feature: [NewGRF] Per vehicle custom cargo ageing period.

This commit is contained in:
michi_cc
2011-08-03 20:55:08 +00:00
parent 442b92ff33
commit 08b7981f37
17 changed files with 74 additions and 16 deletions

View File

@@ -182,6 +182,9 @@ void Ship::UpdateCache()
/* speed_frac == 0 means no reduction while 0xFF means reduction to 1/256. */
this->vcache.cached_max_speed = GetVehicleProperty(this, PROP_SHIP_SPEED, svi->max_speed) * (256 - speed_frac) / 256;
/* Update cargo aging period. */
this->vcache.cached_cargo_age_period = GetVehicleProperty(this, PROP_SHIP_CARGO_AGE_PERIOD, EngInfo(this->engine_type)->cargo_age_period);
this->UpdateVisualEffect();
}