Realistic braking: Cache train overall z position
Refresh cache at a variable rate depending on train length and weight distribution
This commit is contained in:
@@ -3418,6 +3418,7 @@ void Vehicle::LeaveStation()
|
||||
}
|
||||
|
||||
SetBit(Train::From(this)->flags, VRF_LEAVING_STATION);
|
||||
if (Train::From(this)->lookahead != nullptr) Train::From(this)->lookahead->zpos_refresh_remaining = 0;
|
||||
}
|
||||
if (this->type == VEH_ROAD && !(this->vehstatus & VS_CRASHED)) {
|
||||
/* Trigger road stop animation */
|
||||
@@ -3477,6 +3478,7 @@ void Vehicle::AdvanceLoadingInStation()
|
||||
HideFillingPercent(&this->fill_percent_te_id);
|
||||
this->current_order.MakeLoadingAdvance(this->last_station_visited);
|
||||
this->current_order.SetNonStopType(ONSF_NO_STOP_AT_ANY_STATION);
|
||||
if (Train::From(this)->lookahead != nullptr) Train::From(this)->lookahead->zpos_refresh_remaining = 0;
|
||||
this->MarkDirty();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user