equal
deleted
inserted
replaced
886 v->cur_image = 0x0E5E; |
886 v->cur_image = 0x0E5E; |
887 v->type = VEH_Ship; |
887 v->type = VEH_Ship; |
888 v->random_bits = VehicleRandomBits(); |
888 v->random_bits = VehicleRandomBits(); |
889 |
889 |
890 VehiclePositionChanged(v); |
890 VehiclePositionChanged(v); |
891 GetPlayer(_current_player)->num_engines[p1]++; |
|
892 |
891 |
893 InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile); |
892 InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile); |
894 RebuildVehicleLists(); |
893 RebuildVehicleLists(); |
895 InvalidateWindow(WC_COMPANY, v->owner); |
894 InvalidateWindow(WC_COMPANY, v->owner); |
896 if (IsLocalPlayer()) |
895 if (IsLocalPlayer()) |
897 InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Ship); // updates the replace Ship window |
896 InvalidateAutoreplaceWindow(VEH_Ship); // updates the replace Ship window |
|
897 |
|
898 GetPlayer(_current_player)->num_engines[p1]++; |
898 } |
899 } |
899 |
900 |
900 return value; |
901 return value; |
901 } |
902 } |
902 |
903 |
926 RebuildVehicleLists(); |
927 RebuildVehicleLists(); |
927 InvalidateWindow(WC_COMPANY, v->owner); |
928 InvalidateWindow(WC_COMPANY, v->owner); |
928 DeleteWindowById(WC_VEHICLE_VIEW, v->index); |
929 DeleteWindowById(WC_VEHICLE_VIEW, v->index); |
929 DeleteDepotHighlightOfVehicle(v); |
930 DeleteDepotHighlightOfVehicle(v); |
930 DeleteVehicle(v); |
931 DeleteVehicle(v); |
931 if (IsLocalPlayer()) |
|
932 InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Ship); // updates the replace Ship window |
|
933 } |
932 } |
934 |
933 |
935 return -(int32)v->value; |
934 return -(int32)v->value; |
936 } |
935 } |
937 |
936 |