(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.

This commit is contained in:
rubidium
2007-09-08 09:52:02 +00:00
parent 8141fe0898
commit 91a49cee55
6 changed files with 69 additions and 67 deletions

View File

@@ -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);