Funny you ask for that now
It's been requested in irc few days ago and easy to avoid. OnTakeDamage is still called for teamattacks while friendlyfire is off, so setting m_vecPunchAngle to 0 if the attacker and victim teams are equal did the job. I don't have the .sp anymore, but it's easy to redo.
Edit: that's it.
Edit: whoa i'm slow