From Team Fortress Wiki
Friendly fire is used to describe a situation in which a player can damage, or even kill, an ally on the same team.
The ability to inflict friendly damage was originally an option available to servers during the Team Fortress 2 beta. This made setting up an ÜberCharge quicker and also assisted Spies, as it discouraged Spy checking. Valve removed the feature upon release as it was known to cause errors within the game's code, plus gave points to the teamkill, as well as harbor potential for griefing. The low focus on accurate shooting in the game also meant that friendly fire could become an impediment if several classes attempted to cooperate with one another.
Full friendly fire is still available as a server option, but is rarely used in standard play. On these servers, it is impossible to damage friendly buildings or backstab teammates. Lighting your own team on fire is only possible using the Flare Gun when fired at teammates from a certain distance. "Jar-based" weapons, such as Jarate and Mad Milk, have no effect on teammates. It is also possible to Dominate and get Revenge on your teammates. Splash damage from grenades and rockets still have an effect. Also, all of the Sniper's primary weapons (including the Huntsman) deal no damage to allies whatsoever, whether scoped or not.
On some servers friendly fire is temporarily enabled for various reasons, for example while waiting for enough players to join for the round to start, after the round ends, and during Stalemate.
In regular play
- If a Medic is healing an enemy Spy that kills a teammate or destroys a building, the Medic will receive an assist as if he were on the Spy's team.
- If a player kills an enemy who is then autobalanced to the other team, the kill feed will report the death as it were a team kill.
Projectiles, such as grenades, rockets, and Stickybombs (excluding Sentry rockets), will passively go through allies, but your allies will still be affected by splash damage resulting from the explosion of the projectiles.
Weapons that deal fire damage, e.g. Pyro weapons such as the Flamethrower, do not damage or ignite friendly players. The exception to this rule is the Flare Gun which is capable of igniting friendly players at a certain distance.
Critical hits and mini-crits still affect teammates as if they were enemies. Most weapons which have special conditions to crit will also continue to work, such as headshots or hitting a Jarate-covered teammate with the Bushwacka. Notable exceptions include backstabs and crits from the Backburner.