|
@@ -294,6 +294,7 @@ CommandCost CmdBuildRoadVehicle(DoComman
|
|
|
|
|
|
v->reliability = e->reliability;
|
|
|
v->reliability_spd_dec = e->reliability_spd_dec;
|
|
|
v->breakdown_chance = 128;
|
|
|
v->max_age = e->GetLifeLengthInDays();
|
|
|
|
|
|
v->SetServiceInterval(Company::Get(v->owner)->settings.vehicle.servint_roadveh);
|
|
@@ -375,7 +376,6 @@ CommandCost CmdTurnRoadVeh(DoCommandFlag
|
|
|
|
|
|
if ((v->vehstatus & VS_STOPPED) ||
|
|
|
(v->vehstatus & VS_CRASHED) ||
|
|
|
v->breakdown_ctr != 0 ||
|
|
|
v->overtaking != 0 ||
|
|
|
v->state == RVSB_WORMHOLE ||
|
|
|
v->IsInDepot() ||
|
|
@@ -812,6 +812,9 @@ static void RoadVehCheckOvertake(RoadVeh
|
|
|
/* For now, articulated road vehicles can't overtake anything. */
|
|
|
if (v->HasArticulatedPart()) return;
|
|
|
|
|
|
/* Don't overtake if the vehicle is broken or about to break down */
|
|
|
if (v->breakdown_ctr != 0) return;
|
|
|
|
|
|
/* Vehicles are not driving in same direction || direction is not a diagonal direction */
|
|
|
if (v->direction != u->direction || !(v->direction & 1)) return;
|
|
|
|
|
@@ -1573,8 +1576,7 @@ static bool RoadVehController(RoadVehicl
|
|
|
}
|
|
|
|
|
|
/* road vehicle has broken down? */
|
|
|
if (v->HandleBreakdown()) return true;
|
|
|
if (v->vehstatus & VS_STOPPED) {
|
|
|
if (v->HandleBreakdown() || v->vehstatus & VS_STOPPED) {
|
|
|
v->SetLastSpeed();
|
|
|
return true;
|
|
|
}
|
|
@@ -1634,6 +1636,7 @@ Money RoadVehicle::GetRunningCost() cons
|
|
|
if (e->u.road.running_cost_class == INVALID_PRICE) return 0;
|
|
|
|
|
|
uint cost_factor = GetVehicleProperty(this, PROP_ROADVEH_RUNNING_COST_FACTOR, e->u.road.running_cost);
|
|
|
cost_factor *= _settings_game.economy.running_cost_multiplier_road;
|
|
|
if (cost_factor == 0) return 0;
|
|
|
|
|
|
return GetPrice(e->u.road.running_cost_class, cost_factor, e->GetGRF());
|