group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
LagCompMath.hpp File Reference
#include <algorithm>
#include <cstdint>
Include dependency graph for LagCompMath.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  server
namespace  server::lagcomp
 Pure (dependency-free) lag-compensation rewind math.

Functions

constexpr std::uint32_t server::lagcomp::msToTicks (std::uint32_t ms, std::uint32_t tickRateHz)
 Round a millisecond duration to the nearest whole physics tick.
std::uint32_t server::lagcomp::computeRewindTicks (std::uint16_t rttMs, std::uint16_t interpDelayMs, std::uint8_t interpDelaySnapshots, std::uint32_t snapshotEveryNTicks, std::uint32_t tickRateHz, std::uint32_t maxLagCompTicks)
 Compute the lag-compensation rewind depth (in physics ticks) for a shooter from their last-reported net state.