Extend timetable wait/travel times from 16 to 32 bits wide
This commit is contained in:
@@ -2951,7 +2951,7 @@ void Vehicle::HandleLoading(bool mode)
|
||||
{
|
||||
switch (this->current_order.GetType()) {
|
||||
case OT_LOADING: {
|
||||
uint wait_time = max(this->current_order.GetTimetabledWait() - this->lateness_counter, 0);
|
||||
TimetableTicks wait_time = max<int>(this->current_order.GetTimetabledWait() - this->lateness_counter, 0);
|
||||
|
||||
/* Save time just loading took since that is what goes into the timetable */
|
||||
if (!HasBit(this->vehicle_flags, VF_LOADING_FINISHED)) {
|
||||
@@ -2998,7 +2998,7 @@ void Vehicle::HandleWaiting(bool stop_waiting)
|
||||
{
|
||||
switch (this->current_order.GetType()) {
|
||||
case OT_WAITING: {
|
||||
uint wait_time = max(this->current_order.GetTimetabledWait() - this->lateness_counter, 0);
|
||||
uint wait_time = max<int>(this->current_order.GetTimetabledWait() - this->lateness_counter, 0);
|
||||
/* Vehicles holds on until waiting Timetabled time expires. */
|
||||
if (!stop_waiting && this->current_order_time < wait_time && this->current_order.GetLeaveType() != OLT_LEAVE_EARLY) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user