diff options
author | rubidium <rubidium@openttd.org> | 2007-09-08 09:52:02 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-09-08 09:52:02 +0000 |
commit | 91a49cee55bd2162099ef7bd35c318b7e77ab590 (patch) | |
tree | d8567cb4c3be776942b6892104b1373991293490 /src/train_cmd.cpp | |
parent | 8141fe0898de18d0f6a5e8da7231a1adbe7790da (diff) | |
download | openttd-91a49cee55bd2162099ef7bd35c318b7e77ab590.tar.xz |
(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.
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r-- | src/train_cmd.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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); |