equal
deleted
inserted
replaced
771 } |
771 } |
772 |
772 |
773 InvalidateWindow(WC_VEHICLE_DEPOT, tile); |
773 InvalidateWindow(WC_VEHICLE_DEPOT, tile); |
774 RebuildVehicleLists(); |
774 RebuildVehicleLists(); |
775 InvalidateWindow(WC_COMPANY, v->owner); |
775 InvalidateWindow(WC_COMPANY, v->owner); |
|
776 if (IsLocalPlayer()) { |
|
777 InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Train); // updates the replace Train window |
|
778 } |
776 } |
779 } |
777 } |
780 } |
778 _cmd_build_rail_veh_score = _railveh_score[p1]; |
781 _cmd_build_rail_veh_score = _railveh_score[p1]; |
779 |
|
780 InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Train); // updates the replace Train window |
|
781 |
782 |
782 return value; |
783 return value; |
783 } |
784 } |
784 |
785 |
785 |
786 |
1126 if (CheckTrainStoppedInDepot(first) < 0) return CMD_ERROR; |
1127 if (CheckTrainStoppedInDepot(first) < 0) return CMD_ERROR; |
1127 |
1128 |
1128 if (flags & DC_EXEC) { |
1129 if (flags & DC_EXEC) { |
1129 if (v == first && first->subtype == TS_Front_Engine) { |
1130 if (v == first && first->subtype == TS_Front_Engine) { |
1130 DeleteWindowById(WC_VEHICLE_VIEW, first->index); |
1131 DeleteWindowById(WC_VEHICLE_VIEW, first->index); |
|
1132 } |
|
1133 if (IsLocalPlayer() && (p1 == 1 || !(RailVehInfo(v->engine_type)->flags & RVI_WAGON))) { |
1131 InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Train); |
1134 InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Train); |
1132 } |
1135 } |
1133 InvalidateWindow(WC_VEHICLE_DEPOT, first->tile); |
1136 InvalidateWindow(WC_VEHICLE_DEPOT, first->tile); |
1134 RebuildVehicleLists(); |
1137 RebuildVehicleLists(); |
1135 } |
1138 } |