mirror of https://github.com/OpenTTD/OpenTTD
(svn r12142) -Fix [FS#1766]: Callback 0x3D always gets a cargobit in var 0x18, independent of grf version.
parent
43c0f7ea8e
commit
4164d2488f
|
@ -115,9 +115,7 @@ CargoID GetCargoTranslation(uint8 cargo, const GRFFile *grffile, bool usebit)
|
||||||
|
|
||||||
uint8 GetReverseCargoTranslation(CargoID cargo, const GRFFile *grffile)
|
uint8 GetReverseCargoTranslation(CargoID cargo, const GRFFile *grffile)
|
||||||
{
|
{
|
||||||
/* Pre-version 7 uses the 'climate dependent' ID, i.e. cargo is the cargo ID */
|
/* Note: All grf versions use CargoBit here. Pre-version 7 do NOT use the 'climate dependent' ID. */
|
||||||
if (grffile->grf_version < 7) return cargo;
|
|
||||||
|
|
||||||
const CargoSpec *cs = GetCargo(cargo);
|
const CargoSpec *cs = GetCargo(cargo);
|
||||||
|
|
||||||
/* If the GRF contains a translation table (and the cargo is in the table)
|
/* If the GRF contains a translation table (and the cargo is in the table)
|
||||||
|
|
Loading…
Reference in New Issue