Vixen
dd8b0a81
csharp
public struct LagCompensated

Marks a body whose past the server keeps, so a shot can be judged against it.

Read the guide page for this →

Remarks

A tag rather than a call, because the alternative is a call nobody makes. LagCompensator.Track and Forget are the honest primitives and they need a BodyHandle, which a game gets from a component it did not write; asking every spawn and every despawn to remember them is how a body ends up untracked for a match and how a destroyed one's history is kept for an hour.

Put it on what gets shot at — players, vehicles, anything moving fast enough that a client's view of it is meaningfully behind the server's. Not on the level: a wall does not move, so its history is thirty-two copies of one pose and rewinding it costs the same as rewinding a player.

Used by (2)

  • LagCompensationSystemVixen.Net.Physics
  • LagCompensationSystemTestsVixen.Net.Physics.Tests