Consent requires the ability to make a clear, informed choice. When someone is drunk or high, they may not fully understand what is happening or be able to communicate clearly.
In these situations, consent cannot be assumed. The responsibility is on others to stop and respect that a person who is intoxicated is not able to give consent.