I don't think simply being in the room with someone committing a crime, even knowing that's what they're doing, doesn't give you accomplice liability. I think you have to assist or encourage. You do not generally have an affirmative responsibility to prevent people from committing crimes.
edit: but see below