summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2012-03-25 18:18:35 +0000
committerrubidium <rubidium@openttd.org>2012-03-25 18:18:35 +0000
commit02d9ecde6d54fda2a43d24acba8a90ee608c939a (patch)
tree7e3342e219843b763c6d9ead7fc275f9ccc29b95 /src
parent357843378f1db2bc574cf0996a63bda9a2edba8e (diff)
downloadopenttd-02d9ecde6d54fda2a43d24acba8a90ee608c939a.tar.xz
(svn r24063) -Fix [FS#5125]: with certain versions of GCC and compiler flags the compiler could reorder some code badly causing the 32bpp depot flag not working
Diffstat (limited to 'src')
-rw-r--r--src/newgrf.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 27fe019bc..1f796b258 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -6688,13 +6688,12 @@ static void ParamSet(ByteReader *buf)
break;
case 0x9E: // Miscellaneous GRF features
- _misc_grf_features = res;
-
/* Set train list engine width */
- _cur.grffile->traininfo_vehicle_width = HasGrfMiscBit(GMB_TRAIN_WIDTH_32_PIXELS) ? VEHICLEINFO_FULL_VEHICLE_WIDTH : TRAININFO_DEFAULT_VEHICLE_WIDTH;
-
+ _cur.grffile->traininfo_vehicle_width = HasBit(res, GMB_TRAIN_WIDTH_32_PIXELS) ? VEHICLEINFO_FULL_VEHICLE_WIDTH : TRAININFO_DEFAULT_VEHICLE_WIDTH;
/* Remove the local flags from the global flags */
- ClrBit(_misc_grf_features, GMB_TRAIN_WIDTH_32_PIXELS);
+ ClrBit(res, GMB_TRAIN_WIDTH_32_PIXELS);
+
+ _misc_grf_features = res;
break;
case 0x9F: // locale-dependent settings