Navigation
API > API/Runtime > API/Runtime/Engine
Handles game-specific networking management (cheat detection, bandwidth management, etc.).
| Name | AGameNetworkManager |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/GameNetworkManager.h |
| Include Path | #include "GameFramework/GameNetworkManager.h" |
Syntax
UCLASS (Config=Game, NotPlaceable, MinimalAPI)
class AGameNetworkManager : public AInfo
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → AActor → AInfo → AGameNetworkManager
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
AGameNetworkManager
(
const FObjectInitializer& ObjectInitializer |
GameFramework/GameNetworkManager.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AdjustedNetSpeed | int32 | Current adjusted bandwidth per player, based on total and dynamic bandwidth | GameFramework/GameNetworkManager.h | |
| BadPacketLossThreshold | float | If packet loss goes over this value, we have bad packet loss. Value is between 0 and 1. | GameFramework/GameNetworkManager.h |
|
| BadPingThreshold | int32 | If average ping is higher than this threshold in ms, determine the server is either delaying packets or has bad upstream. | GameFramework/GameNetworkManager.h |
|
| bHasStandbyCheatTriggered | uint32 | Used to determine whether we've already caught a cheat or not | GameFramework/GameNetworkManager.h | |
| bIsStandbyCheckingEnabled | uint32 | Used to determine if checking for standby cheats should occur | GameFramework/GameNetworkManager.h |
|
| bMovementTimeDiscrepancyDetection | bool | Whether movement time discrepancy (speed hack) detection is enabled. | GameFramework/GameNetworkManager.h |
|
| bMovementTimeDiscrepancyForceCorrectionsDuringResolution | bool | Whether client moves should be force corrected during time discrepancy resolution, useful for projects that have lenient move error tolerance/ClientAuthorativePosition enabled. | GameFramework/GameNetworkManager.h |
|
| bMovementTimeDiscrepancyResolution | bool | Whether movement time discrepancy resolution is enabled (when detected, make client movement "pay back" excessive time discrepancies) | GameFramework/GameNetworkManager.h |
|
| bUseDistanceBasedRelevancy | bool | If true, actor network relevancy is constrained by whether they are within their NetCullDistanceSquared from the client's view point. | GameFramework/GameNetworkManager.h |
|
| CLIENTADJUSTUPDATECOST | float | CLIENTADJUSTUPDATECOST is the bandwidth cost in bytes of sending a client adjustment update. | GameFramework/GameNetworkManager.h |
|
| ClientAuthorativePosition | bool | If client update is within MAXPOSITIONERRORSQUARED of what the server expects then the client is authoritative on it's final position | GameFramework/GameNetworkManager.h |
|
| ClientErrorUpdateRateLimit | float | Minimum delay between the server sending error corrections to a client, in seconds. | GameFramework/GameNetworkManager.h |
|
| ClientNetCamUpdateDeltaTime | float | Minimum delay between calls to ServerUpdateCamera, in seconds. | GameFramework/GameNetworkManager.h |
|
| ClientNetCamUpdatePositionLimit | float | Camera position change limit, when exceeded allows an immediate ServerUpdateCamera call. | GameFramework/GameNetworkManager.h |
|
| ClientNetSendMoveDeltaTime | float | ClientNetSendMoveDeltaTime is the default minimum time delta of CharacterMovement client moves to the server. | GameFramework/GameNetworkManager.h |
|
| ClientNetSendMoveDeltaTimeStationary | float | ClientNetSendMoveDeltaTimeStationary is used when players are determined to not be moving or changing their view. | GameFramework/GameNetworkManager.h |
|
| ClientNetSendMoveDeltaTimeThrottled | float | ClientNetSendMoveDeltaTimeThrottled is used in place of ClientNetSendMoveDeltaTime when player count is high or net speed is low. | GameFramework/GameNetworkManager.h |
|
| ClientNetSendMoveThrottleAtNetSpeed | int32 | When player net speed (CurrentNetSpeed, based on ConfiguredInternetSpeed or ConfiguredLanSpeed) is less than or equal to this amount, ClientNetSendMoveDeltaTimeThrottled is used instead of ClientNetSendMoveDeltaTime. | GameFramework/GameNetworkManager.h |
|
| ClientNetSendMoveThrottleOverPlayerCount | int32 | When player count is greater than this amount, ClientNetSendMoveDeltaTimeThrottled is used instead of ClientNetSendMoveDeltaTime. | GameFramework/GameNetworkManager.h |
|
| JoinInProgressStandbyWaitTime | float | The amount of time to wait before checking a connection for standby issues | GameFramework/GameNetworkManager.h |
|
| LastNetSpeedUpdateTime | float | Last time AdjustedNetSpeed was updated for server (by client entering or leaving) | GameFramework/GameNetworkManager.h | |
| MaxClientForcedUpdateDuration | float | MaxClientForcedUpdateDuration is the maximum time duration over which the server will force updates, after MAXCLIENTUPDATEINTERVAL is initially exceeded. | GameFramework/GameNetworkManager.h |
|
| MaxClientSmoothingDeltaTime | float | MaxClientSmoothingDeltaTime is the maximum delta time between server updates that clients are allowed to smooth between for position interpolation. | GameFramework/GameNetworkManager.h |
|
| MAXCLIENTUPDATEINTERVAL | float | MAXCLIENTUPDATEINTERVAL is the maximum time between movement updates from the client before the server forces an update. | GameFramework/GameNetworkManager.h |
|
| MaxDynamicBandwidth | int32 | Maximum bandwidth set per connection after splitting TotalNetBandwidth | GameFramework/GameNetworkManager.h |
|
| MaxMoveDeltaTime | float | MaxMoveDeltaTime is the default maximum time delta of CharacterMovement ServerMoves. | GameFramework/GameNetworkManager.h |
|
| MAXNEARZEROVELOCITYSQUARED | float | MAXNEARZEROVELOCITYSQUARED is the square of the max velocity that is considered zero (not corrected) in net play | GameFramework/GameNetworkManager.h |
|
| MAXPOSITIONERRORSQUARED | float | MAXPOSITIONERRORSQUARED is the square of the max position error that is accepted (not corrected) in net play | GameFramework/GameNetworkManager.h |
|
| MinDynamicBandwidth | int32 | Minimum bandwidth set per connection after splitting TotalNetBandwidth | GameFramework/GameNetworkManager.h |
|
| MovementTimeDiscrepancyDriftAllowance | float | Accepted drift in clocks between client and server as a percent per second allowed. | GameFramework/GameNetworkManager.h |
|
| MovementTimeDiscrepancyMaxTimeMargin | float | Maximum time client can be ahead before triggering movement time discrepancy detection/resolution (if enabled). | GameFramework/GameNetworkManager.h |
|
| MovementTimeDiscrepancyMinTimeMargin | float | Maximum time client can be behind. | GameFramework/GameNetworkManager.h |
|
| MovementTimeDiscrepancyResolutionRate | float | During time discrepancy resolution, we "pay back" the time discrepancy at this rate for future moves until total error is zero. | GameFramework/GameNetworkManager.h |
|
| MoveRepSize | float | Average size of replicated move packet (ServerMove() packet size) from player | GameFramework/GameNetworkManager.h |
|
| PercentForBadPing | float | The percentage of clients with bad ping before triggering the standby code | GameFramework/GameNetworkManager.h |
|
| PercentMissingForRxStandby | float | The percentage of clients missing RX data before triggering the standby code | GameFramework/GameNetworkManager.h |
|
| PercentMissingForTxStandby | float | The percentage of clients missing TX data before triggering the standby code | GameFramework/GameNetworkManager.h |
|
| ServerForcedUpdateHitchCooldown | float | Ignore forced client movement updates when server hitch was detected within this amount of time in the past. | GameFramework/GameNetworkManager.h |
|
| ServerForcedUpdateHitchThreshold | float | Ignore forced client movement updates when server hitches for longer than this duration. | GameFramework/GameNetworkManager.h |
|
| SeverePacketLossThreshold | float | If the packet loss goes over this threshold, we have severe packet loss. Value is between 0 and 1 | GameFramework/GameNetworkManager.h |
|
| SeverePingThreshold | int32 | Similar to BadPingThreshold, but used to track exceptionally bad pings. | GameFramework/GameNetworkManager.h |
|
| StandbyRxCheatTime | float | The amount of time without packets before triggering the cheat code | GameFramework/GameNetworkManager.h |
|
| StandbyTxCheatTime | float | The amount of time without packets before triggering the cheat code | GameFramework/GameNetworkManager.h |
|
| TotalNetBandwidth | int32 | Total available bandwidth (in bytes/sec) for listen server, split dynamically across net connections | GameFramework/GameNetworkManager.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual int32 CalculatedNetSpeed() |
@RETURN new per/client bandwidth given number of players in the game | GameFramework/GameNetworkManager.h | |
virtual void EnableStandbyCheatDetection
(
bool bIsEnabled |
Standby cheat detection. | GameFramework/GameNetworkManager.h | |
virtual bool ExceedsAllowablePositionError
(
FVector LocDiff |
GameFramework/GameNetworkManager.h | ||
virtual bool IsInLowBandwidthMode() |
Returns true if we should be in low bandwidth mode | GameFramework/GameNetworkManager.h | |
virtual bool NetworkVelocityNearZero
(
FVector InVelocity |
GameFramework/GameNetworkManager.h | ||
virtual void StandbyCheatDetected
(
EStandbyType StandbyType |
Notifies the game code that a standby cheat was detected | GameFramework/GameNetworkManager.h | |
virtual void UpdateNetSpeeds
(
bool bIsLanMatch |
Update network speeds for listen servers based on number of connected players. | GameFramework/GameNetworkManager.h | |
virtual void UpdateNetSpeedsTimer() |
Timer which calls UpdateNetSpeeds() once a second. | GameFramework/GameNetworkManager.h | |
virtual bool WithinUpdateDelayBounds
(
APlayerController* PC, |
GameFramework/GameNetworkManager.h |
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostInitializeComponents() |
Allow actors to initialize themselves on the C++ side after all of their components have been initialized, only called during gameplay | GameFramework/GameNetworkManager.h |