equal
deleted
inserted
replaced
497 |
497 |
498 UpdateTrainAcceleration(v); |
498 UpdateTrainAcceleration(v); |
499 NormalizeTrainVehInDepot(v); |
499 NormalizeTrainVehInDepot(v); |
500 |
500 |
501 InvalidateWindow(WC_VEHICLE_DEPOT, tile); |
501 InvalidateWindow(WC_VEHICLE_DEPOT, tile); |
502 _vehicle_sort_dirty[VEHTRAIN] = true; // build a trainengine |
502 RebuildVehicleLists(); |
503 InvalidateWindow(WC_TRAINS_LIST, v->owner); |
|
504 InvalidateWindow(WC_COMPANY, v->owner); |
503 InvalidateWindow(WC_COMPANY, v->owner); |
505 } |
504 } |
506 } |
505 } |
507 _cmd_build_rail_veh_var1 = _railveh_unk1[p1]; |
506 _cmd_build_rail_veh_var1 = _railveh_unk1[p1]; |
508 _cmd_build_rail_veh_score = _railveh_score[p1]; |
507 _cmd_build_rail_veh_score = _railveh_score[p1]; |
809 |
808 |
810 if (flags & DC_EXEC) { |
809 if (flags & DC_EXEC) { |
811 // always redraw the depot. maybe redraw train list |
810 // always redraw the depot. maybe redraw train list |
812 InvalidateWindow(WC_VEHICLE_DEPOT, first->tile); |
811 InvalidateWindow(WC_VEHICLE_DEPOT, first->tile); |
813 if (first->subtype == 0) { |
812 if (first->subtype == 0) { |
814 _vehicle_sort_dirty[VEHTRAIN] = true; // sell a wagon / locomotive |
813 RebuildVehicleLists(); |
815 InvalidateWindow(WC_TRAINS_LIST, first->owner); |
|
816 } |
814 } |
817 // when selling an attached locomotive. we need to delete its window. |
815 // when selling an attached locomotive. we need to delete its window. |
818 if (v->subtype == 0) { |
816 if (v->subtype == 0) { |
819 DeleteWindowById(WC_VEHICLE_VIEW, v->index); |
817 DeleteWindowById(WC_VEHICLE_VIEW, v->index); |
820 |
818 |
2252 } |
2250 } |
2253 u->next = NULL; |
2251 u->next = NULL; |
2254 |
2252 |
2255 InvalidateWindow(WC_VEHICLE_DETAILS, v->index); |
2253 InvalidateWindow(WC_VEHICLE_DETAILS, v->index); |
2256 DeleteWindowById(WC_VEHICLE_VIEW, v->index); |
2254 DeleteWindowById(WC_VEHICLE_VIEW, v->index); |
2257 _vehicle_sort_dirty[VEHTRAIN] = true; // remove crashed train |
2255 RebuildVehicleLists(); |
2258 InvalidateWindow(WC_TRAINS_LIST, v->owner); |
|
2259 InvalidateWindow(WC_COMPANY, v->owner); |
2256 InvalidateWindow(WC_COMPANY, v->owner); |
2260 |
2257 |
2261 BeginVehicleMove(v); |
2258 BeginVehicleMove(v); |
2262 EndVehicleMove(v); |
2259 EndVehicleMove(v); |
2263 DeleteVehicle(v); |
2260 DeleteVehicle(v); |