(svn r20645) -Codechange [FS#4086]: unify the code for checking for breakdown handling as well (Hirundo)
This commit is contained in:
@@ -3716,13 +3716,7 @@ static bool TrainLocoHandler(Train *v, bool mode)
|
||||
}
|
||||
|
||||
/* train is broken down? */
|
||||
if (v->breakdown_ctr != 0) {
|
||||
if (v->breakdown_ctr <= 2) {
|
||||
v->HandleBreakdown();
|
||||
return true;
|
||||
}
|
||||
if (!v->current_order.IsType(OT_LOADING)) v->breakdown_ctr--;
|
||||
}
|
||||
if (v->HandleBreakdown()) return true;
|
||||
|
||||
if (HasBit(v->flags, VRF_REVERSING) && v->cur_speed == 0) {
|
||||
ReverseTrainDirection(v);
|
||||
|
Reference in New Issue
Block a user