I assumed it would have to communicate with the server, but how does it work in games like tf2? There is no pointing ahead of the target, what ever your cross hair is on at the time your press the mouse is hit, or receives damage. Wouldn't that mean the client determines if the player is hit and then sends that information to the server?
Nope, Source Engine works in a fun way. First it has lag compensation client sided so everything looks better. Try setting cl_lagcompensation 0 in TF2 and playing.
Also Source Engine servers work by basically going back in time depending on the current tick and checking if you were aiming at something then, even though server side things have moved since then. (or at least that's what I remember)