diff options
author | peter1138 <peter1138@openttd.org> | 2006-10-26 13:18:12 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-10-26 13:18:12 +0000 |
commit | e5e5fb6e938b81963b7b88a84b02bdac067dfbf5 (patch) | |
tree | 450c990a91a66bfc57834f29059cdf6d7bcaf786 | |
parent | b755a2d896ddb0060324953fb2a7deee716c604a (diff) | |
download | openttd-e5e5fb6e938b81963b7b88a84b02bdac067dfbf5.tar.xz |
(svn r6946) - Fix (r6654): This applies to all vehicle types, not just rail vehicles... (mart3p)
-rw-r--r-- | newgrf.c | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -577,7 +577,10 @@ static bool RoadVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf break; case 0x1C: /* Miscellaneous flags */ - FOR_EACH_OBJECT ei[i].misc_flags = grf_load_byte(&buf); + FOR_EACH_OBJECT { + ei[i].misc_flags = grf_load_byte(&buf); + if (HASBIT(ei[i].misc_flags, EF_USES_2CC)) _have_2cc = true; + } break; case 0x1D: /* Cargo classes allowed */ @@ -684,7 +687,10 @@ static bool ShipVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf break; case 0x17: /* Miscellaneous flags */ - FOR_EACH_OBJECT ei[i].misc_flags = grf_load_byte(&buf); + FOR_EACH_OBJECT { + ei[i].misc_flags = grf_load_byte(&buf); + if (HASBIT(ei[i].misc_flags, EF_USES_2CC)) _have_2cc = true; + } break; case 0x18: /* Cargo classes allowed */ @@ -790,7 +796,10 @@ static bool AircraftVehicleChangeInfo(uint engine, int numinfo, int prop, byte * break; case 0x17: /* Miscellaneous flags */ - FOR_EACH_OBJECT ei[i].misc_flags = grf_load_byte(&buf); + FOR_EACH_OBJECT { + ei[i].misc_flags = grf_load_byte(&buf); + if (HASBIT(ei[i].misc_flags, EF_USES_2CC)) _have_2cc = true; + } break; case 0x18: /* Cargo classes allowed */ |