Random Axe said:What about the fact that in melee both combatants are assumed to be moving back and forth and all around, dancing for a better attack? I would think that the Ally doesn't give "cover" to the bad guy, it's only a melee situation that the Precise Shot is designed to affect. I wouldn't double up the penalties for shooting at this bad guy.
pg 150 and 151 of the PHB talk about cover and soft cover and when to apply it.
The Cover Against Ranged Attacks picture on pg 151 also explains when it applies.