(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:
celestar 2006-04-09 18:35:24 +00:00
parent a4a891c007
commit 6926bd55fd
1 changed files with 1 additions and 0 deletions

View File

@ -548,6 +548,7 @@ void DeleteVehicle(Vehicle *v)
u = v->next;
has_artic_part = EngineHasArticPart(v);
DeleteName(v->string_id);
if (v->type == VEH_Road) ClearSlot(v);
v->type = 0;
UpdateVehiclePosHash(v, INVALID_COORD, 0);
v->next_hash = INVALID_VEHICLE;