[HL2MP] Fix spectator exploits
Issue: By default, it is possible to unfairly kill people when attacking them and switching to spectators quickly.
Example: If TDM is enabled and you throw a grenade to a team mate and switch to spectators before that grenade blows, then that grenade will hurt or kill what used to be your team mate. This is because the game thinks you are no longer in the same team, and logically, you are not anymore.
Fix: The fix is to treat all damage done by anyone in spectators as no damage. This fix also applies if TDM is disabled.
why not check the projectile's team instead of the attacker's team?
why not check the projectile's team instead of the attacker's team?
iirc in HL2MP projectiles aren't assigned to a team, so its owner's team has to be checked.
EDIT: also unlike TF2, HL2 bullets don't have a projectile assigned to them. HL2 Bullets are raycast and are controlled through FireBullets which can be called on the weapon or the player (preferably on the player though so the player can get kills properly)