(svn r8890) -Codechange: (NewGRF) add cargo translation support to engine var 47

This commit is contained in:
2007-02-24 23:20:21 +00:00
parent 5aaff3b5a1
commit 29c8142784
3 changed files with 26 additions and 1 deletions

View File

@@ -608,7 +608,7 @@ static uint32 VehicleGetVariable(const ResolverObject *object, byte variable, by
*/
const CargoSpec *cs = GetCargo(v->cargo_type);
return (cs->classes << 16) | (cs->weight << 8) | cs->bitnum;
return (cs->classes << 16) | (cs->weight << 8) | GetEngineGRF(v->engine_type)->cargo_map[v->cargo_type];
}
case 0x48: return GetVehicleTypeInfo(v->engine_type); /* Vehicle Type Info */