(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:
		@@ -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;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user