Merge branch 'master' into jgrpp
# Conflicts: # Makefile.src.in # findversion.sh # projects/determineversion.vbs # src/aircraft_cmd.cpp # src/lang/dutch.txt # src/linkgraph/linkgraph_gui.cpp # src/linkgraph/linkgraph_gui.h # src/order_cmd.cpp # src/settings_gui.cpp # src/smallmap_gui.cpp # src/town_cmd.cpp # src/viewport.cpp # src/water_map.h
This commit is contained in:
@@ -116,8 +116,9 @@ int32 GetPickupAmount(CargoMonitorID monitor, bool keep_monitoring)
|
||||
* @param src_type type of \a src.
|
||||
* @param src index of source.
|
||||
* @param st station where the cargo is delivered to.
|
||||
* @param dest industry index where the cargo is delivered to.
|
||||
*/
|
||||
void AddCargoDelivery(CargoID cargo_type, CompanyID company, uint32 amount, SourceType src_type, SourceID src, const Station *st)
|
||||
void AddCargoDelivery(CargoID cargo_type, CompanyID company, uint32 amount, SourceType src_type, SourceID src, const Station *st, IndustryID dest)
|
||||
{
|
||||
if (amount == 0) return;
|
||||
|
||||
@@ -150,6 +151,7 @@ void AddCargoDelivery(CargoID cargo_type, CompanyID company, uint32 amount, Sour
|
||||
|
||||
/* Industry delivery. */
|
||||
for (const Industry * const *ip = st->industries_near.Begin(); ip != st->industries_near.End(); ip++) {
|
||||
if ((*ip)->index != dest) continue;
|
||||
CargoMonitorID num = EncodeCargoIndustryMonitor(company, cargo_type, (*ip)->index);
|
||||
CargoMonitorMap::iterator iter = _cargo_deliveries.find(num);
|
||||
if (iter != _cargo_deliveries.end()) iter->second += amount;
|
||||
|
Reference in New Issue
Block a user