Stupid people can do whatever they want to themselves; they only get to me when they have power over me. If they're in my way, supposedly on my team yet fucking around, a useless coworker, etc, I get fed up with them dragging me down pretty quickly.
The solution is to not let them have power. Find a way around their idiocy, go over their head, ignore them, and sometimes teamkill them. Whatever it takes to get them out of my way or out of my life. Normally the solution doesn't present itself immediately, so being patient is important, but a solution will present itself at some point.