mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r4341) -Fix (FS#101) When a player got bankrupt, slots were not cleared, because vehicles got deleted directly by DeleteVehicle
This commit is contained in:
parent
a4a891c007
commit
6926bd55fd
|
@ -548,6 +548,7 @@ void DeleteVehicle(Vehicle *v)
|
||||||
u = v->next;
|
u = v->next;
|
||||||
has_artic_part = EngineHasArticPart(v);
|
has_artic_part = EngineHasArticPart(v);
|
||||||
DeleteName(v->string_id);
|
DeleteName(v->string_id);
|
||||||
|
if (v->type == VEH_Road) ClearSlot(v);
|
||||||
v->type = 0;
|
v->type = 0;
|
||||||
UpdateVehiclePosHash(v, INVALID_COORD, 0);
|
UpdateVehiclePosHash(v, INVALID_COORD, 0);
|
||||||
v->next_hash = INVALID_VEHICLE;
|
v->next_hash = INVALID_VEHICLE;
|
||||||
|
|
Loading…
Reference in New Issue