(svn r24273) -Fix: [NewGRF] GetReverseCargoTranslation() was unnecessary complicated and also returned the wrong thing for cargos not present in the translation table.

This commit is contained in:
frosch
2012-05-25 17:23:19 +00:00
parent 9522dbb1a9
commit 5a34b744b1
4 changed files with 2 additions and 18 deletions

View File

@@ -958,7 +958,7 @@ void TriggerStationAnimation(BaseStation *st, TileIndex tile, StationAnimationTr
if (cargo_type == CT_INVALID) {
cargo = CT_INVALID;
} else {
cargo = GetReverseCargoTranslation(cargo_type, ss->grf_prop.grffile);
cargo = ss->grf_prop.grffile->cargo_map[cargo_type];
}
StationAnimationBase::ChangeAnimationFrame(CBID_STATION_ANIM_START_STOP, ss, st, tile, (random_bits << 16) | Random(), (uint8)trigger | (cargo << 8));
}