Import Improved Breakdowns patch

Fix trailing whitespace

http://www.tt-forums.net/viewtopic.php?p=1146419#p1146419
This commit is contained in:
patch-import
2015-08-02 22:58:41 +01:00
committed by Jonathan G Rennison
parent c8a727d3fc
commit 9f5164b403
24 changed files with 761 additions and 84 deletions

View File

@@ -298,6 +298,7 @@ CommandCost CmdBuildRoadVehicle(TileIndex tile, DoCommandFlag flags, const Engin
v->reliability = e->reliability;
v->reliability_spd_dec = e->reliability_spd_dec;
v->breakdown_chance = 128;
v->max_age = e->GetLifeLengthInDays();
_new_vehicle_id = v->index;
@@ -383,7 +384,6 @@ CommandCost CmdTurnRoadVeh(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
if ((v->vehstatus & VS_STOPPED) ||
(v->vehstatus & VS_CRASHED) ||
v->breakdown_ctr != 0 ||
v->overtaking != 0 ||
v->state == RVSB_WORMHOLE ||
v->IsInDepot() ||
@@ -817,6 +817,9 @@ static void RoadVehCheckOvertake(RoadVehicle *v, RoadVehicle *u)
/* 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;