Player:LagCompensation
Description
This allows the server to mitigate the lag of the player by moving back all the entities that can be lag compensated to the time the player attacked with his weapon.
This technique is most commonly used on things that hit other entities instantaneously, such as traces.
Entity:FireBullets calls this function internally.
Lag compensation only works for players and entities that have been enabled with Entity:SetLagCompensated
Despite being defined shared, it can only be used server-side in a Predicted Hook.
This function NEEDS to be disabled after you're done with it or it will break the movement of the entities affected!
Arguments
Example
Do a crowbar-like melee trace, enabling lag compensation before doing so.