diff options
author | rubidium <rubidium@openttd.org> | 2008-04-21 14:33:33 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-04-21 14:33:33 +0000 |
commit | 5ef8c01ce7d7b554d678d5270baafb1146c80b57 (patch) | |
tree | 4c1ef67d89a0fbc13b10c3ed8a9880350b14ab12 /src/newgrf_generic.cpp | |
parent | 22140d82c6efb1a6a03e1e4db0eca48766dce8ba (diff) | |
download | openttd-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/newgrf_generic.cpp')
-rw-r--r-- | src/newgrf_generic.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/newgrf_generic.cpp b/src/newgrf_generic.cpp index 0097979e3..682ecdb33 100644 --- a/src/newgrf_generic.cpp +++ b/src/newgrf_generic.cpp @@ -176,5 +176,7 @@ uint16 GetAiPurchaseCallbackResult(uint8 feature, CargoID cargo_type, uint8 defa object.u.generic.count = count; object.u.generic.station_size = station_size; - return GetGenericCallbackResult(feature, &object, file); + uint16 callback = GetGenericCallbackResult(feature, &object, file); + if (callback != CALLBACK_FAILED) callback = GB(callback, 0, 8); + return callback; } |