summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2006-04-09 18:35:24 +0000
committercelestar <celestar@openttd.org>2006-04-09 18:35:24 +0000
commit6926bd55fd4f1d36745082b668b052c1b6691ad8 (patch)
tree12a0d809d5b6459f0c812496bc5d33c53e02b884
parenta4a891c007c0346ba2e6a923013d082439a06fe0 (diff)
downloadopenttd-6926bd55fd4f1d36745082b668b052c1b6691ad8.tar.xz
(svn r4341) -Fix (FS#101) When a player got bankrupt, slots were not cleared, because vehicles got deleted directly by DeleteVehicle
-rw-r--r--vehicle.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vehicle.c b/vehicle.c
index 5b0d9a960..4f1894322 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -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;