Codechange: move tick-counter into TimerGameTick (#10712)
This commit is contained in:
@@ -58,6 +58,7 @@
|
||||
#include "newgrf_roadstop.h"
|
||||
#include "timer/timer.h"
|
||||
#include "timer/timer_game_calendar.h"
|
||||
#include "timer/timer_game_tick.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -2116,7 +2117,7 @@ void Vehicle::BeginLoading()
|
||||
{
|
||||
assert(IsTileType(this->tile, MP_STATION) || this->type == VEH_SHIP);
|
||||
|
||||
Ticks travel_time = _tick_counter - this->last_loading_tick;
|
||||
Ticks travel_time = TimerGameTick::counter - this->last_loading_tick;
|
||||
if (this->current_order.IsType(OT_GOTO_STATION) &&
|
||||
this->current_order.GetDestination() == this->last_station_visited) {
|
||||
this->DeleteUnreachedImplicitOrders();
|
||||
@@ -2281,7 +2282,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;
|
||||
this->last_loading_tick = TimerGameTick::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