equal
deleted
inserted
replaced
558 } |
558 } |
559 } |
559 } |
560 |
560 |
561 void DestroyVehicle(Vehicle *v) |
561 void DestroyVehicle(Vehicle *v) |
562 { |
562 { |
563 if (IsEngineCountable(v)) GetPlayer(v->owner)->num_engines[v->engine_type]--; |
563 if (IsEngineCountable(v)) { |
|
564 GetPlayer(v->owner)->num_engines[v->engine_type]--; |
|
565 if (v->owner == _local_player) InvalidateAutoreplaceWindow(v->engine_type); |
|
566 } |
564 |
567 |
565 DeleteVehicleNews(v->index, INVALID_STRING_ID); |
568 DeleteVehicleNews(v->index, INVALID_STRING_ID); |
566 |
569 |
567 DeleteName(v->string_id); |
570 DeleteName(v->string_id); |
568 if (v->type == VEH_Road) ClearSlot(v); |
571 if (v->type == VEH_Road) ClearSlot(v); |