group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
LagCompTarget Struct Reference

Server tick to which to rewind other entities' hitboxes when resolving this entity's hitscan. More...

#include <LagCompTarget.hpp>

Public Attributes

uint32_t targetServerTick = 0
uint16_t lagTicks = 0
 PR-22: lag-compensation distance in ticks (currentServerTick − targetServerTick).
uint16_t rttMs = 0
 PR-22: shooter's most recent reported RTT in ms.

Detailed Description

Server tick to which to rewind other entities' hitboxes when resolving this entity's hitscan.

Zero = no rewind.

Member Data Documentation

◆ lagTicks

uint16_t LagCompTarget::lagTicks = 0

PR-22: lag-compensation distance in ticks (currentServerTick − targetServerTick).

Stored alongside the target so the shot-log path can record it without plumbing the per-tick tickCount into WeaponSystem::handleFire. Zero when no rewind requested. Diagnostic only — rewindHitboxes reads targetServerTick directly.

◆ rttMs

uint16_t LagCompTarget::rttMs = 0

PR-22: shooter's most recent reported RTT in ms.

Used by the netsync hit-reg analyzer to bucket shots by RTT without having to join against the per-client net-stats stream. Zero before the first ping round-trip completes.

◆ targetServerTick

uint32_t LagCompTarget::targetServerTick = 0

The documentation for this struct was generated from the following file: