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 | e947fde7013a09d58744604faaf3c574dae51c47 (patch) | |
tree | 4c1ef67d89a0fbc13b10c3ed8a9880350b14ab12 /src/newgrf_generic.cpp | |
parent | bbe13a0623eea9f46353fca57a35ae745040fbaf (diff) | |
download | openttd-e947fde7013a09d58744604faaf3c574dae51c47.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; } |