(svn r23947) -Feature: Timetabled maximum travel speeds for non-flying vehicles.

This commit is contained in:
michi_cc
2012-02-14 17:04:06 +00:00
parent 347157cb8c
commit f2c694c8fb
15 changed files with 96 additions and 15 deletions

View File

@@ -416,7 +416,7 @@ void RoadVehicle::UpdateDeltaXY(Direction direction)
*/
inline int RoadVehicle::GetCurrentMaxSpeed() const
{
if (_settings_game.vehicle.roadveh_acceleration_model == AM_ORIGINAL) return this->vcache.cached_max_speed;
if (_settings_game.vehicle.roadveh_acceleration_model == AM_ORIGINAL) return min(this->vcache.cached_max_speed, this->current_order.max_speed * 2);
int max_speed = this->vcache.cached_max_speed;
@@ -430,7 +430,7 @@ inline int RoadVehicle::GetCurrentMaxSpeed() const
}
}
return max_speed;
return min(max_speed, this->current_order.max_speed * 2);
}
/**