equal
deleted
inserted
replaced
157 if (v->type != 0) { |
157 if (v->type != 0) { |
158 v->left_coord = INVALID_COORD; |
158 v->left_coord = INVALID_COORD; |
159 VehiclePositionChanged(v); |
159 VehiclePositionChanged(v); |
160 |
160 |
161 if (v->type == VEH_Train) { |
161 if (v->type == VEH_Train) { |
162 if (v->subtype == 0) |
162 if (v->subtype == TS_Front_Engine) |
163 UpdateTrainAcceleration(v); |
163 UpdateTrainAcceleration(v); |
164 } |
164 } |
165 } |
165 } |
166 } |
166 } |
167 |
167 |
2010 |
2010 |
2011 // Iterate through trains and set first_engine appropriately. |
2011 // Iterate through trains and set first_engine appropriately. |
2012 FOR_ALL_VEHICLES(v) { |
2012 FOR_ALL_VEHICLES(v) { |
2013 Vehicle *w; |
2013 Vehicle *w; |
2014 |
2014 |
2015 if (v->type != VEH_Train || v->subtype != 0) |
2015 if (v->type != VEH_Train || v->subtype != TS_Front_Engine) |
2016 continue; |
2016 continue; |
2017 |
2017 |
2018 for (w = v->next; w; w = w->next) |
2018 for (w = v->next; w; w = w->next) |
2019 w->u.rail.first_engine = v->engine_type; |
2019 w->u.rail.first_engine = v->engine_type; |
2020 } |
2020 } |