Fix #9665: [Linkgraph] Fix travel times of non-direct journeys
This commit is contained in:

committed by
Michael Lutz

parent
c5369caa45
commit
f8a7b76675
@@ -2114,7 +2114,7 @@ void Vehicle::BeginLoading()
|
||||
{
|
||||
assert(IsTileType(this->tile, MP_STATION) || this->type == VEH_SHIP);
|
||||
|
||||
uint32 travel_time = this->current_order_time;
|
||||
Ticks travel_time = _tick_counter - this->last_loading_tick;
|
||||
if (this->current_order.IsType(OT_GOTO_STATION) &&
|
||||
this->current_order.GetDestination() == this->last_station_visited) {
|
||||
this->DeleteUnreachedImplicitOrders();
|
||||
@@ -2279,6 +2279,7 @@ void Vehicle::LeaveStation()
|
||||
|
||||
/* if the vehicle could load here or could stop with cargo loaded set the last loading station */
|
||||
this->last_loading_station = this->last_station_visited;
|
||||
this->last_loading_tick = _tick_counter;
|
||||
} else {
|
||||
/* if the vehicle couldn't load and had to unload or transfer everything
|
||||
* set the last loading station to invalid as it will leave empty. */
|
||||
|
Reference in New Issue
Block a user