1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-24 20:54:08 +01:00

(svn r12871) [0.6] -Backport from trunk r12819, r12818, r12759:

- Fix: Inconsistent use of 8/15-bitness of NewGRF callback results with respect to TTDP's implementation of the specification (r12819, r12818, r12759)
This commit is contained in:
rubidium
2008-04-24 14:33:18 +00:00
parent f126c2e66f
commit 9241c4649d
12 changed files with 24 additions and 67 deletions

View File

@@ -175,5 +175,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;
}