Mercurial > hg > openttd
diff src/train_cmd.cpp @ 7539:2695ac2e8baa draft
(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.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sat, 08 Sep 2007 09:52:02 +0000 (2007-09-08) |
parents | d334553f6db4 |
children | b8e1d03b1e83 |
line wrap: on
line diff
--- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -95,6 +95,9 @@ } 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);