Fix: only count distance traveled in vehicles for cargo payment (#11283)
No longer you can utilize the free (and instant) labour of station
workers, transporting your cargo from one part of the station to
the other. No more!
Based on patch by dP.
(cherry picked from commit df400ef84a
)
This commit is contained in:

committed by
Jonathan G Rennison

parent
05c35c8e31
commit
4280c413a6
@@ -1717,7 +1717,7 @@ struct ReturnCargoAction
|
||||
*/
|
||||
bool operator()(Vehicle *v)
|
||||
{
|
||||
v->cargo.Return(UINT_MAX, &this->st->goods[v->cargo_type].CreateData().cargo, this->next_hop);
|
||||
v->cargo.Return(UINT_MAX, &this->st->goods[v->cargo_type].CreateData().cargo, this->next_hop, v->tile);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -2097,7 +2097,7 @@ static void LoadUnloadVehicle(Vehicle *front)
|
||||
uint new_remaining = v->cargo.RemainingCount() + v->cargo.ActionCount(VehicleCargoList::MTA_DELIVER);
|
||||
if (v->cargo_cap < new_remaining) {
|
||||
/* Return some of the reserved cargo to not overload the vehicle. */
|
||||
v->cargo.Return(new_remaining - v->cargo_cap, &ged->cargo, INVALID_STATION);
|
||||
v->cargo.Return(new_remaining - v->cargo_cap, &ged->cargo, INVALID_STATION, v->tile);
|
||||
}
|
||||
|
||||
/* Keep instead of delivering. This may lead to no cargo being unloaded, so ...*/
|
||||
|
Reference in New Issue
Block a user