diff options
author | frosch <frosch@openttd.org> | 2011-09-01 19:43:37 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-09-01 19:43:37 +0000 |
commit | c9765caf6ae71a6ead2695258842d13ea8d205b8 (patch) | |
tree | ba9bd38f9d229743047f7c4974d524f67eaeda99 /src | |
parent | cbf3bae992265c501c6f1f1044a024aeeb59d318 (diff) | |
download | openttd-c9765caf6ae71a6ead2695258842d13ea8d205b8.tar.xz |
(svn r22867) -Fix (r12122): Variables 40 and 81 of callback 18 are not the same as 80.
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf_generic.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_generic.cpp b/src/newgrf_generic.cpp index 90a11f8fb..abf2461dd 100644 --- a/src/newgrf_generic.cpp +++ b/src/newgrf_generic.cpp @@ -85,10 +85,10 @@ static void GenericCallbackSetTriggers(const ResolverObject *object, int trigger static uint32 GenericCallbackGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available) { switch (variable) { - case 0x40: return object->u.generic.cargo_type; + case 0x40: return object->grffile->cargo_map[object->u.generic.cargo_type]; case 0x80: return object->u.generic.cargo_type; - case 0x81: return object->u.generic.cargo_type; + case 0x81: return CargoSpec::Get(object->u.generic.cargo_type)->bitnum; case 0x82: return object->u.generic.default_selection; case 0x83: return object->u.generic.src_industry; case 0x84: return object->u.generic.dst_industry; |