File diff r5793:9b6cdefbeeea → r5794:197ed16e0231
src/vehicle.cpp
Show inline comments
 
@@ -2149,13 +2149,13 @@ static int32 MaybeReplaceVehicle(Vehicle
 
		-1
 
	);
 

	
 

	
 
	_current_player = v->owner;
 

	
 
	assert(v->type == VEH_Train || v->type == VEH_Road || v->type == VEH_Ship || v->type == VEH_Aircraft);
 
	assert(IsPlayerBuildableVehicleType(v));
 

	
 
	assert(v->vehstatus & VS_STOPPED); // the vehicle should have been stopped in VehicleEnteredDepotThisTick() if needed
 

	
 
	/* Remember the flag v->leave_depot_instantly because if we replace the vehicle, the vehicle holding this flag will be sold
 
	 * If it is set, then we only stopped the vehicle to replace it (if needed) and we will need to start it again.
 
	 * We also need to reset the flag since it should remain false except from when the vehicle enters a depot until autoreplace is handled in the same tick */