diff options
author | rubidium <rubidium@openttd.org> | 2007-07-07 17:36:01 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-07-07 17:36:01 +0000 |
commit | f60d055d8dc637075e26b0b021ba6e99e4dd4f33 (patch) | |
tree | 9b03b93ed2d2b7b422ce005b32d1b6131c093eb7 /src | |
parent | 6a5d9e28c12c47f13336b0964a618d8006c75854 (diff) | |
download | openttd-f60d055d8dc637075e26b0b021ba6e99e4dd4f33.tar.xz |
(svn r10466) -Fix: the minimum amount of waiting cargo shouldn't be 65535; that should be the maximum amount of waiting cargo.
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf_industries.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index e9d8a686c..6eb97ebee 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -125,7 +125,7 @@ uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte par case 0x42: { // waiting cargo, but only if those two callback flags are set uint16 callback = indspec->callback_flags; if (HASBIT(callback, CBM_IND_PRODUCTION_CARGO_ARRIVAL) || HASBIT(callback, CBM_IND_PRODUCTION_256_TICKS)) { - return max(industry->incoming_cargo_waiting[variable - 0x40], (uint16)0xFFFF); + return min(industry->incoming_cargo_waiting[variable - 0x40], (uint16)0xFFFF); } else { return 0; } @@ -156,7 +156,7 @@ uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte par case 0x80: return industry->xy; case 0x81: return GB(industry->xy, 8, 8); /* Pointer to the town the industry is associated with */ - case 0x82: + case 0x82: return industry->town->index; case 0x83: case 0x84: case 0x85: DEBUG(grf, 0, "NewGRFs shouldn't be doing pointer magic"); break; // not supported |