summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-21 14:33:33 +0000
committerrubidium <rubidium@openttd.org>2008-04-21 14:33:33 +0000
commit5ef8c01ce7d7b554d678d5270baafb1146c80b57 (patch)
tree4c1ef67d89a0fbc13b10c3ed8a9880350b14ab12 /src/train_cmd.cpp
parent22140d82c6efb1a6a03e1e4db0eca48766dce8ba (diff)
downloadopenttd-5ef8c01ce7d7b554d678d5270baafb1146c80b57.tar.xz
(svn r12819) -Codechange: handle more NewGRFs in the same way as TTDP does it, i.e. testing the low bits for 0xFF or 0 instead of all bits.
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 4f55e30ce..a1a378602 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -240,7 +240,7 @@ void TrainConsistChanged(Vehicle *v)
if (HasBit(EngInfo(u->engine_type)->callbackmask, CBM_TRAIN_WAGON_POWER)) {
uint16 callback = GetVehicleCallback(CBID_TRAIN_WAGON_POWER, 0, 0, u->engine_type, u);
- if (callback != CALLBACK_FAILED) u->u.rail.cached_vis_effect = callback;
+ if (callback != CALLBACK_FAILED) u->u.rail.cached_vis_effect = GB(callback, 0, 8);
}
if (rvi_v->pow_wag_power != 0 && rvi_u->railveh_type == RAILVEH_WAGON &&