Today I played vs some Europeans, and I had a yellow bar, but according to some people yellow bar means you will have advantage, but instead my shots took a lot of time to connect and a lot of the times I died without even having a chance. So how does lag compensation work? --- WiiU ID: GermanicMexican
after each client receives a snapshot of the game state from the server, the client sends back an acknowledgement. because every player will have a different connection, the location they will see all the other playres will be slightly different. the server uses the time stamps of "acknowledged snapshots" to rewind the positions of all players when it tests whether a bullet hit any players. bullets travel instantly in call of duty, there is no ballistics modeling. so lag will not affect how long it takes a bullet to travel although it will affect how long it takes your wii u to tell the server to start firing your weapon even though the client begins playing the animation of shooting immediately.
you can get an idea of how lag compensation works from playing modern warfare: reflex. because that game didnt have it, you could shoot at a position in front of a moving target and get a hit. why? because you would be shooting at the position the player was at in the host machine instead of what you see. because blops2 uses lag compensation you can get a hit from shooting at where you see an enemy positioned even though in his version of the game he's standing in a different position.
lag compensation does not completely compensate for lag and it doesn't give an advantage to a lagged player. for example, the host player has zero lag. assuming all other players have a ping of 100ms, he will see you 1/10th of a second before you see him. a player with a ping of 200ms is 2/10th of a second behind and so on.