equal
deleted
inserted
replaced
182 v->cur_image = 0xC15; |
182 v->cur_image = 0xC15; |
183 |
183 |
184 VehiclePositionChanged(v); |
184 VehiclePositionChanged(v); |
185 |
185 |
186 InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); |
186 InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); |
187 _vehicle_sort_dirty[VEHROAD] = true; // build a new bus/truck |
187 RebuildVehicleLists(); |
188 InvalidateWindow(WC_ROADVEH_LIST, v->owner); |
|
189 InvalidateWindow(WC_COMPANY, v->owner); |
188 InvalidateWindow(WC_COMPANY, v->owner); |
190 } |
189 } |
191 |
190 |
192 return cost; |
191 return cost; |
193 } |
192 } |
226 return_cmd_error(STR_9013_MUST_BE_STOPPED_INSIDE); |
225 return_cmd_error(STR_9013_MUST_BE_STOPPED_INSIDE); |
227 |
226 |
228 if (flags & DC_EXEC) { |
227 if (flags & DC_EXEC) { |
229 // Invalidate depot |
228 // Invalidate depot |
230 InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); |
229 InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); |
231 _vehicle_sort_dirty[VEHROAD] = true; // sell a bus/truck |
230 RebuildVehicleLists(); |
232 InvalidateWindow(WC_ROADVEH_LIST, v->owner); |
|
233 InvalidateWindow(WC_COMPANY, v->owner); |
231 InvalidateWindow(WC_COMPANY, v->owner); |
234 DeleteWindowById(WC_VEHICLE_VIEW, v->index); |
232 DeleteWindowById(WC_VEHICLE_VIEW, v->index); |
235 DeleteVehicle(v); |
233 DeleteVehicle(v); |
236 } |
234 } |
237 |
235 |
420 static void RoadVehDelete(Vehicle *v) |
418 static void RoadVehDelete(Vehicle *v) |
421 { |
419 { |
422 DeleteWindowById(WC_VEHICLE_VIEW, v->index); |
420 DeleteWindowById(WC_VEHICLE_VIEW, v->index); |
423 InvalidateWindow(WC_VEHICLE_DETAILS, v->index); |
421 InvalidateWindow(WC_VEHICLE_DETAILS, v->index); |
424 |
422 |
425 _vehicle_sort_dirty[VEHROAD] = true; // delete bus/truck (eg. crash for example) |
423 RebuildVehicleLists(); |
426 InvalidateWindow(WC_ROADVEH_LIST, v->owner); |
|
427 InvalidateWindow(WC_COMPANY, v->owner); |
424 InvalidateWindow(WC_COMPANY, v->owner); |
428 |
425 |
429 if(IS_TILETYPE(v->tile, MP_STATION)) |
426 if(IS_TILETYPE(v->tile, MP_STATION)) |
430 ClearCrashedStation(v); |
427 ClearCrashedStation(v); |
431 |
428 |