Add train cache flag for whether train using realistic braking physics
This commit is contained in:
@@ -3647,7 +3647,7 @@ static VehicleEnterTileStatus VehicleEnter_Station(Vehicle *v, TileIndex tile, i
|
||||
stop &= TILE_SIZE - 1;
|
||||
|
||||
if (x == stop) {
|
||||
if (_settings_game.vehicle.train_braking_model == TBM_REALISTIC && front->cur_speed > 15 && !(front->lookahead != nullptr && HasBit(front->lookahead->flags, TRLF_APPLY_ADVISORY))) {
|
||||
if (front->UsingRealisticBraking() && front->cur_speed > 15 && !(front->lookahead != nullptr && HasBit(front->lookahead->flags, TRLF_APPLY_ADVISORY))) {
|
||||
/* Travelling too fast, do not stop and report overshoot to player */
|
||||
if (front->owner == _local_company) {
|
||||
SetDParam(0, front->index);
|
||||
@@ -3664,7 +3664,7 @@ static VehicleEnterTileStatus VehicleEnter_Station(Vehicle *v, TileIndex tile, i
|
||||
}
|
||||
return VETSB_ENTERED_STATION | (VehicleEnterTileStatus)(station_id << VETS_STATION_ID_OFFSET); // enter station
|
||||
} else if (x < stop) {
|
||||
if (_settings_game.vehicle.train_braking_model == TBM_REALISTIC && front->cur_speed > 30) {
|
||||
if (front->UsingRealisticBraking()&& front->cur_speed > 30) {
|
||||
/* Travelling too fast, take no action */
|
||||
return VETSB_CONTINUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user