(svn r9828) -Codechange: [NewGRF] Add support for changing cargo capacity with callback 36. This is set on construction for ships and roadvehicles, and whenever carriages are attached for trains.

This commit is contained in:
peter1138
2007-05-12 07:05:34 +00:00
parent 5e00e688f8
commit 1d5135830a
4 changed files with 14 additions and 7 deletions

View File

@@ -220,6 +220,8 @@ void TrainConsistChanged(Vehicle* v)
}
}
u->cargo_cap = GetVehicleProperty(u, 0x14, rvi_u->capacity);
/* check the vehicle length (callback) */
uint16 veh_len = CALLBACK_FAILED;
if (HASBIT(EngInfo(u->engine_type)->callbackmask, CBM_VEHICLE_LENGTH)) {