Drunk people can consent to having sex, otherwise every woman who has sex with a man who has been drinking is guilty of sexual assault and most adults would have criminal records.  People who are incapacitated cannot consent to sex but the onus is on the crown to prove their case beyond a reasonable doubt.