diff options
author | frosch <frosch@openttd.org> | 2011-11-08 17:26:49 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-11-08 17:26:49 +0000 |
commit | 30874b5e81af0fff2f42d34b9b105ee86666b8ac (patch) | |
tree | 6fd8200f08019910de826cf6f1b9b6e92f7d2d69 /src/newgrf_industries.cpp | |
parent | b98c7763de42eda4b3d19604bc3f33452b9b05e4 (diff) | |
download | openttd-30874b5e81af0fff2f42d34b9b105ee86666b8ac.tar.xz |
(svn r23147) -Change: [NewGRF v8] Unify the return values of boolean callbacks, and check the results for validity.
Diffstat (limited to 'src/newgrf_industries.cpp')
-rw-r--r-- | src/newgrf_industries.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index 2f469dc71..4d61dd4bf 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -661,7 +661,7 @@ bool IndustryTemporarilyRefusesCargo(Industry *ind, CargoID cargo_type) uint16 res = GetIndustryCallback(CBID_INDUSTRY_REFUSE_CARGO, 0, GetReverseCargoTranslation(cargo_type, indspec->grf_prop.grffile), ind, ind->type, ind->location.tile); - return res == 0; + if (res != CALLBACK_FAILED) return !ConvertBooleanCallback(indspec->grf_prop.grffile, CBID_INDUSTRY_REFUSE_CARGO, res); } return false; } |