G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
FPacketSimulationSettings Struct Reference

Holds the packet simulation settings in one place. More...

Public Member Functions

Functions
FPacketSimulationSettings & opAssign (FPacketSimulationSettings Other)

Public Attributes

Simulation Settings
int PktLagVariance
 When set, will cause PktLag to use variable lag instead of constant. Value is treated as millisecond lag range (e.g. -GivenVariance <= 0 <= GivenVariance).
int PktLossMaxSize
 Sets the maximum size of packets in bytes that will be dropped according to the PktLoss setting. Default is INT_MAX.
int PktLossMinSize
 Sets the minimum size of packets in bytes that will be dropped according to the PktLoss setting. Default is 0.
int PktOrder
 When set, will cause calls to FlushNet to change ordering of packets at random. Value is treated as a bool (i.e. 0 = False, anything else = True). This works by randomly selecting packets to be delayed until a subsequent call to FlushNet.
int PktDup
 When set, will cause calls to FlushNet to duplicate packets. Value is treated as % of packets duplicated (i.e. 0 = None, 100 = All). No general pattern / ordering is guaranteed. Clamped between 0 and 100.
int PktLag
 When set, will cause calls to FlushNet to delay packets. Value is treated as millisecond lag.
int PktLoss
 When set, will cause calls to FlushNet to drop packets. Value is treated as % of packets dropped (i.e. 0 = None, 100 = All). No general pattern / ordering is guaranteed. Clamped between 0 and 100.
int PktLagMin
 If set lag values will randomly fluctuate between Min and Max. Ignored if PktLag value is set.
int PktLagMax
int PktIncomingLagMin
 Set a value to add a minimum delay in milliseconds to incoming packets before they are processed.
int PktIncomingLagMax
 The maximum delay in milliseconds to add to incoming packets before they are processed.
int PktIncomingLoss
 The ratio of incoming packets that will be dropped to simulate packet loss.
int PktJitter
 Causes sent packets to have a variable latency that fluctuates from [PktLagMin] to [PktLagMin+PktJitter] Note that this will cause packet loss on the receiving end.

Detailed Description

Holds the packet simulation settings in one place.

Member Function Documentation

◆ opAssign()

Member Data Documentation

◆ PktDup

int PktDup

When set, will cause calls to FlushNet to duplicate packets. Value is treated as % of packets duplicated (i.e. 0 = None, 100 = All). No general pattern / ordering is guaranteed. Clamped between 0 and 100.

Cannot be used with PktOrder or PktLag.

◆ PktIncomingLagMax

int PktIncomingLagMax

The maximum delay in milliseconds to add to incoming packets before they are processed.

◆ PktIncomingLagMin

int PktIncomingLagMin

Set a value to add a minimum delay in milliseconds to incoming packets before they are processed.

◆ PktIncomingLoss

int PktIncomingLoss

The ratio of incoming packets that will be dropped to simulate packet loss.

◆ PktJitter

int PktJitter

Causes sent packets to have a variable latency that fluctuates from [PktLagMin] to [PktLagMin+PktJitter] Note that this will cause packet loss on the receiving end.

◆ PktLag

int PktLag

When set, will cause calls to FlushNet to delay packets. Value is treated as millisecond lag.

Cannot be used with PktOrder.

◆ PktLagMax

int PktLagMax

◆ PktLagMin

int PktLagMin

If set lag values will randomly fluctuate between Min and Max. Ignored if PktLag value is set.

◆ PktLagVariance

int PktLagVariance

When set, will cause PktLag to use variable lag instead of constant. Value is treated as millisecond lag range (e.g. -GivenVariance <= 0 <= GivenVariance).

Can only be used when PktLag is enabled.

◆ PktLoss

int PktLoss

When set, will cause calls to FlushNet to drop packets. Value is treated as % of packets dropped (i.e. 0 = None, 100 = All). No general pattern / ordering is guaranteed. Clamped between 0 and 100.

Works with all other settings.

◆ PktLossMaxSize

int PktLossMaxSize

Sets the maximum size of packets in bytes that will be dropped according to the PktLoss setting. Default is INT_MAX.

Works with all other settings.

◆ PktLossMinSize

int PktLossMinSize

Sets the minimum size of packets in bytes that will be dropped according to the PktLoss setting. Default is 0.

Works with all other settings.

◆ PktOrder

int PktOrder

When set, will cause calls to FlushNet to change ordering of packets at random. Value is treated as a bool (i.e. 0 = False, anything else = True). This works by randomly selecting packets to be delayed until a subsequent call to FlushNet.

Takes precedence over PktDup and PktLag.