summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-10-26 13:18:12 +0000
committerpeter1138 <peter1138@openttd.org>2006-10-26 13:18:12 +0000
commite5e5fb6e938b81963b7b88a84b02bdac067dfbf5 (patch)
tree450c990a91a66bfc57834f29059cdf6d7bcaf786
parentb755a2d896ddb0060324953fb2a7deee716c604a (diff)
downloadopenttd-e5e5fb6e938b81963b7b88a84b02bdac067dfbf5.tar.xz
(svn r6946) - Fix (r6654): This applies to all vehicle types, not just rail vehicles... (mart3p)
-rw-r--r--newgrf.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/newgrf.c b/newgrf.c
index ef9fbe686..2805531e6 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -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 */