Merge branch 'improved_breakdowns-sx' into jgrpp

Conflicts:
	src/saveload/extended_ver_sl.cpp
	src/saveload/extended_ver_sl.h
	src/settings_type.h
This commit is contained in:
Jonathan G Rennison
2015-08-02 23:43:19 +01:00
24 changed files with 790 additions and 104 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;