From c97804461eb696393a9bf4acc2f9b57738349066 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 8 Sep 2007 09:52:02 +0000 Subject: (svn r11059) -Fix [FS#1182]: inconsistency between Rail<->ElRail conversions of different kinds of rail containing tiles (normal rail, stations, depots, etc). Patch by SmatZ. --- src/train_cmd.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/train_cmd.cpp') diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index a475c61ec..f850f7c42 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -95,6 +95,9 @@ void TrainPowerChanged(Vehicle* v) } if (v->u.rail.cached_power != total_power || v->u.rail.cached_max_te != max_te) { + /* If it has no power (no catenary), stop the train */ + if (total_power == 0) v->vehstatus |= VS_STOPPED; + v->u.rail.cached_power = total_power; v->u.rail.cached_max_te = max_te; InvalidateWindow(WC_VEHICLE_DETAILS, v->index); -- cgit v1.2.3-70-g09d2