equal
deleted
inserted
replaced
93 total_power += RailVehInfo(u->u.rail.first_engine)->pow_wag_power; |
93 total_power += RailVehInfo(u->u.rail.first_engine)->pow_wag_power; |
94 } |
94 } |
95 } |
95 } |
96 |
96 |
97 if (v->u.rail.cached_power != total_power || v->u.rail.cached_max_te != max_te) { |
97 if (v->u.rail.cached_power != total_power || v->u.rail.cached_max_te != max_te) { |
|
98 /* If it has no power (no catenary), stop the train */ |
|
99 if (total_power == 0) v->vehstatus |= VS_STOPPED; |
|
100 |
98 v->u.rail.cached_power = total_power; |
101 v->u.rail.cached_power = total_power; |
99 v->u.rail.cached_max_te = max_te; |
102 v->u.rail.cached_max_te = max_te; |
100 InvalidateWindow(WC_VEHICLE_DETAILS, v->index); |
103 InvalidateWindow(WC_VEHICLE_DETAILS, v->index); |
101 InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); |
104 InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); |
102 } |
105 } |