# HG changeset patch # User rubidium # Date 1183829761 0 # Node ID a877e27650aab5e2c3213f7e40f2bd58717a5e6d # Parent 7ff8b678b459ba674630ffae3fb879c120be0bd1 (svn r10466) -Fix: the minimum amount of waiting cargo shouldn't be 65535; that should be the maximum amount of waiting cargo. diff -r 7ff8b678b459 -r a877e27650aa src/newgrf_industries.cpp --- a/src/newgrf_industries.cpp Sat Jul 07 17:33:29 2007 +0000 +++ b/src/newgrf_industries.cpp Sat Jul 07 17:36:01 2007 +0000 @@ -125,7 +125,7 @@ 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 @@ 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