comparison src/town_cmd.cpp @ 11874:1091625b3d21 draft

(svn r16268) -Fix (r9876): When callback 2E returns an amount of 0, do not transport 1 unit to the station.
author frosch <frosch@openttd.org>
date Sun, 10 May 2009 15:42:59 +0000
parents b4b83f6e760a
children 0552f4ad7c9e
comparison
equal deleted inserted replaced
11873:ed0cb1f1acbf 11874:1091625b3d21
453 453
454 CargoID cargo = GetCargoTranslation(GB(callback, 8, 7), hs->grffile); 454 CargoID cargo = GetCargoTranslation(GB(callback, 8, 7), hs->grffile);
455 if (cargo == CT_INVALID) continue; 455 if (cargo == CT_INVALID) continue;
456 456
457 uint amt = GB(callback, 0, 8); 457 uint amt = GB(callback, 0, 8);
458 if (amt == 0) continue;
459
458 uint moved = MoveGoodsToStation(tile, 1, 1, cargo, amt); 460 uint moved = MoveGoodsToStation(tile, 1, 1, cargo, amt);
459 461
460 const CargoSpec *cs = GetCargo(cargo); 462 const CargoSpec *cs = GetCargo(cargo);
461 switch (cs->town_effect) { 463 switch (cs->town_effect) {
462 case TE_PASSENGERS: 464 case TE_PASSENGERS: