mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-31 10:29:10 +00:00
(svn r12795) -Fix [FS#1938]: vehicles could break down during loading and keep loading. The intention of the break down code is not to break down when having zero speed, therefor break downs now do not happen when loading.
This commit is contained in:
@@ -2086,7 +2086,7 @@ static void AircraftEventHandler(Vehicle *v, int loop)
|
||||
if (v->breakdown_ctr <= 2) {
|
||||
HandleBrokenAircraft(v);
|
||||
} else {
|
||||
v->breakdown_ctr--;
|
||||
if (!v->current_order.IsType(OT_LOADING)) v->breakdown_ctr--;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1844,7 +1844,7 @@ static void RoadVehController(Vehicle *v)
|
||||
HandleBrokenRoadVeh(v);
|
||||
return;
|
||||
}
|
||||
v->breakdown_ctr--;
|
||||
if (!v->current_order.IsType(OT_LOADING)) v->breakdown_ctr--;
|
||||
}
|
||||
|
||||
if (v->vehstatus & VS_STOPPED) return;
|
||||
|
@@ -594,7 +594,7 @@ static void ShipController(Vehicle *v)
|
||||
HandleBrokenShip(v);
|
||||
return;
|
||||
}
|
||||
v->breakdown_ctr--;
|
||||
if (!v->current_order.IsType(OT_LOADING)) v->breakdown_ctr--;
|
||||
}
|
||||
|
||||
if (v->vehstatus & VS_STOPPED) return;
|
||||
|
@@ -3421,7 +3421,7 @@ static void TrainLocoHandler(Vehicle *v, bool mode)
|
||||
HandleBrokenTrain(v);
|
||||
return;
|
||||
}
|
||||
v->breakdown_ctr--;
|
||||
if (!v->current_order.IsType(OT_LOADING)) v->breakdown_ctr--;
|
||||
}
|
||||
|
||||
if (HasBit(v->u.rail.flags, VRF_REVERSING) && v->cur_speed == 0) {
|
||||
|
Reference in New Issue
Block a user