Merge branch 'master' into improved_breakdowns
This commit is contained in:
@@ -2634,7 +2634,9 @@ void Vehicle::ShowVisualEffect() const
|
||||
return;
|
||||
}
|
||||
|
||||
uint max_speed = this->vcache.cached_max_speed;
|
||||
/* Use the speed as limited by underground and orders. */
|
||||
uint max_speed = this->GetCurrentMaxSpeed();
|
||||
|
||||
if (this->type == VEH_TRAIN) {
|
||||
const Train *t = Train::From(this);
|
||||
/* For trains, do not show any smoke when:
|
||||
@@ -2643,14 +2645,10 @@ void Vehicle::ShowVisualEffect() const
|
||||
*/
|
||||
if (HasBit(t->flags, VRF_REVERSING) ||
|
||||
(IsRailStationTile(t->tile) && t->IsFrontEngine() && t->current_order.ShouldStopAtStation(t, GetStationIndex(t->tile)) &&
|
||||
t->cur_speed >= t->Train::GetCurrentMaxSpeed())) {
|
||||
t->cur_speed >= max_speed)) {
|
||||
return;
|
||||
}
|
||||
|
||||
max_speed = min(max_speed, t->gcache.cached_max_track_speed);
|
||||
max_speed = min(max_speed, this->current_order.GetMaxSpeed());
|
||||
}
|
||||
if (this->type == VEH_ROAD || this->type == VEH_SHIP) max_speed = min(max_speed, this->current_order.GetMaxSpeed() * 2);
|
||||
|
||||
const Vehicle *v = this;
|
||||
|
||||
|
Reference in New Issue
Block a user