Difference between revisions of "Lag compensation"
m (Auto: templateParamFilter (Review RC#3836928)) |
GrampaSwood (talk | contribs) (mc) |
||
Line 16: | Line 16: | ||
* Fixed an exploit with The [[Eureka Effect]] and The [[Phlogistinator]] where the effects could activate without taunting in high-lag situations | * Fixed an exploit with The [[Eureka Effect]] and The [[Phlogistinator]] where the effects could activate without taunting in high-lag situations | ||
− | '''{{Patch name|9|10|2014}} | + | '''{{Patch name|9|10|2014|num=1}}''' |
* Fixed [[vdc:trigger_push|push triggers]] applying push values twice when lag compensation is being done | * Fixed [[vdc:trigger_push|push triggers]] applying push values twice when lag compensation is being done | ||
Line 22: | Line 22: | ||
* Fixed the [[Short Circuit]] causing lag compensation problems on the server | * Fixed the [[Short Circuit]] causing lag compensation problems on the server | ||
− | '''{{Patch name|3|28|2018}}''' | + | '''{{Patch name|3|28|2018|major=Blue Moon Pack}}''' |
* Lag compensation system will now reliably restore pose parameters responsible for animation layering | * Lag compensation system will now reliably restore pose parameters responsible for animation layering | ||
** This makes server-side hitboxes for lag compensated players better match client-side rendered models | ** This makes server-side hitboxes for lag compensated players better match client-side rendered models | ||
'''{{Patch name|7|7|2022}}''' | '''{{Patch name|7|7|2022}}''' | ||
− | * Fixed lag compensation when [[ | + | * Fixed lag compensation when [[melee]]-ing teammates |
'''{{Patch name|12|6|2022}}''' | '''{{Patch name|12|6|2022}}''' | ||
− | * [[ | + | * [[VScript]] support changes |
** Fixed lag compensation when [[friendly fire]] is enabled | ** Fixed lag compensation when [[friendly fire]] is enabled | ||
− | '''{{Patch name|7|18|2024}} | + | '''{{Patch name|7|18|2024|major=Summer 2024 Update|num=1}}''' |
* Fixed [[Gunslinger]] punch combo not being lag compensated (community fix from Marxvee)}} | * Fixed [[Gunslinger]] punch combo not being lag compensated (community fix from Marxvee)}} | ||
Latest revision as of 07:40, 2 October 2025
“ | Stop lagging and start tagging, men!
Click to listen
— The Soldier
|
” |
Team Fortress 2, being a Source Engine game, is generally configured to make use of lag compensation. Lag compensation is most commonly the technical reason behind cases of kills or actions that would otherwise seem infeasible in given circumstances; for example, when players perceive themselves to have been "shot through a wall" by a Sniper, backstabs being performed at the incorrect angle (known as facestabs), or otherwise missing entirely (known as failstabs).
When a high-latency (high-ping) player attacks, the server temporarily "rewinds" its copy of the action in order to compensate for their lag. For example, the enemy Sniper shoots when he sees your head, at that moment you and most other players may believe you successfully ran behind a wall. When the server receives the fire message from the Sniper, it "rewinds", finds out if you had ought to have been hit, and then deals damage, leading to the appearance of being "killed through a wall".
This system is an intentional trade-off designed to maintain the fairness of attacks at the cost of making damage reception feel less immediate. Without lag compensation, attacks that appear to hit but fail to register, especially in the case of melee weapons, would occur more frequently.
Exceptions
Projectile weapons such as rockets, grenades, syringes, and flares are not lag-compensated. The Pyro's compression blast and Flame Thrower are also not lag compensated, despite the effects appearing immediately after firing on a player's screen. This makes Pyro an increasingly difficult class to play at higher latencies.
Spectators do not have lag compensation. If you are spectating someone in first person, you are not seeing exactly what they are seeing, rather you are looking at what the server is seeing. This is especially noticeable with high-latency Snipers, where you should expect to see unusual shots that may appear to miss or jerk about from your perspective.
Update history
- Fixed an exploit with The Eureka Effect and The Phlogistinator where the effects could activate without taunting in high-lag situations
- Fixed push triggers applying push values twice when lag compensation is being done
- Fixed the Short Circuit causing lag compensation problems on the server
March 28, 2018 Patch (Blue Moon Pack)
- Lag compensation system will now reliably restore pose parameters responsible for animation layering
- This makes server-side hitboxes for lag compensated players better match client-side rendered models
- Fixed lag compensation when melee-ing teammates
- VScript support changes
- Fixed lag compensation when friendly fire is enabled
July 18, 2024 Patch 1 (Summer 2024 Update)
- Fixed Gunslinger punch combo not being lag compensated (community fix from Marxvee)
See also
External links
See the following links for in-depth technical explanation of how lag compensation works in the Source Engine:
- Lag compensation on the Valve Developer Community
- Latency_Compensating Methods in Client/Server In-game Protocol Design and Optimization on the Valve Developer Community
- Source Multiplayer Networking on the Valve Developer Community
- Prediction on the Valve Developer Community
|