diff options
author | rubidium <rubidium@openttd.org> | 2010-08-28 14:14:37 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-08-28 14:14:37 +0000 |
commit | 2fb18e975c0d9bcd75e3536bf41192c5fedda8b6 (patch) | |
tree | 1679e9e6786d2599682c0bcc697071426b5d7e22 /src/train_cmd.cpp | |
parent | 702cc96943a5ffb52fd59718075667044a86775e (diff) | |
download | openttd-2fb18e975c0d9bcd75e3536bf41192c5fedda8b6.tar.xz |
(svn r20645) -Codechange [FS#4086]: unify the code for checking for breakdown handling as well (Hirundo)
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r-- | src/train_cmd.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 3fab4a3bc..28b1d997f 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -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); |