class

FNetSimulator

Module
Networking
Header
#include "Networking/NetSimulation.h"
Namespace
Mowo

Properties

TypeNameDescription
static constexpr uint32_tkReorderHoldMsA reordered frame is held this much longer than its siblings, which is what lets a frame submitted AFTER it come out first. Fixed rather than derived from the jitter so "reorder without jitter" is still a reorder. Default 40.

Public functions

ReturnsNameDescription
uint64_tNextRandomsplitmix64 — small, seedable, and identical on every platform, which is what makes an injected pattern reproducible in a test.
floatNextUnit[0, 1) as a float, from one step of the generator.
boolRollPercentTrue percent of the time.
uint32_tRollRangeUniform in [0, maxInclusive].
FDecisionDecidePure: the whole verdict for one frame, in a fixed roll order (loss, duplicate, reorder, jitter) so a seed pins the outcome.
uint64_tNowMsMonotonic milliseconds — the clock the delay queue is expressed in.
const FNetSimSettings&CurrentProcess-wide settings, refreshed from the cvars by NetworkManager::Update so a change on the console reaches a live session on the next frame.
voidSetCurrent
voidRefreshFromCvars
FNetSimSettingsReadCvarsRead the five cvars into a settings block without publishing it.
voidPushToOnlineServicesPush the settings onto every registered IOnlineService, so Steam's own FakePacketLoss/FakePacketLag knobs track the same cvars the ENet injector reads.

Function details

NextRandom

C++
static uint64_t NextRandom(uint64_t& state)

splitmix64 — small, seedable, and identical on every platform, which is what makes an injected pattern reproducible in a test.

NextUnit

C++
static float NextUnit(uint64_t& state)

[0, 1) as a float, from one step of the generator.

RollPercent

C++
static bool RollPercent(uint64_t& state, float percent)

True percent of the time. Guards the two ends so 0 never fires and 100 always does regardless of float rounding.

RollRange

C++
static uint32_t RollRange(uint64_t& state, uint32_t maxInclusive)

Uniform in [0, maxInclusive].

Decide

C++
static FDecision Decide(const FNetSimSettings& settings, uint64_t& state)

Pure: the whole verdict for one frame, in a fixed roll order (loss, duplicate, reorder, jitter) so a seed pins the outcome.

NowMs

C++
static uint64_t NowMs()

Monotonic milliseconds — the clock the delay queue is expressed in.

Current

C++
static const FNetSimSettings& Current()

Process-wide settings, refreshed from the cvars by NetworkManager::Update so a change on the console reaches a live session on the next frame.

SetCurrent

C++
static void SetCurrent(const FNetSimSettings& settings)

RefreshFromCvars

C++
static void RefreshFromCvars()

ReadCvars

C++
static FNetSimSettings ReadCvars()

Read the five cvars into a settings block without publishing it.

PushToOnlineServices

C++
static void PushToOnlineServices(const FNetSimSettings& settings)

Push the settings onto every registered IOnlineService, so Steam's own FakePacketLoss/FakePacketLag knobs track the same cvars the ENet injector reads. Only fires when the settings actually changed.

Generated from Networking/NetSimulation.h via networking.json · Nov 4, 2026Version 1.0.0