ClientNetSendMoveDeltaTimeStationary
ClientNetSendMoveDeltaTimeStationary
#Overview
name: ClientNetSendMoveDeltaTimeStationary
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ClientNetSendMoveDeltaTimeStationary is to control the rate at which stationary clients send movement updates to the server in Unreal Engine’s networking system.
This setting variable is primarily used by the Engine’s networking and character movement systems. It is specifically referenced in the GameFramework and CharacterMovementComponent modules.
The value of this variable is set in the AGameNetworkManager constructor in GameNetworkManager.cpp. It is initialized with a default value of 0.0166f, which corresponds to approximately 60 updates per second.
ClientNetSendMoveDeltaTimeStationary interacts with other networking-related variables such as ClientNetSendMoveDeltaTime and ClientNetSendMoveDeltaTimeThrottled. It is used in conjunction with these variables to determine the appropriate update rate for different client states.
Developers must be aware that this variable specifically affects stationary characters. It is used when a character is determined to be not moving or changing their view direction. This can help optimize network traffic by reducing unnecessary updates for idle characters.
Best practices when using this variable include:
- Adjusting it carefully to balance between network performance and game responsiveness.
- Consider the game’s specific requirements and player count when setting this value.
- Test thoroughly with various network conditions to ensure smooth gameplay.
- Be mindful of how this interacts with other network-related settings for a holistic approach to network optimization.
Developers should also note that this variable is marked with UPROPERTY(GlobalConfig), meaning it can be configured globally and potentially overridden in configuration files.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseGame.ini:35, section: [/Script/Engine.GameNetworkManager]
- INI Section:
/Script/Engine.GameNetworkManager
- Raw value:
0.0166
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/GameFramework/GameNetworkManager.h:160
Scope (from outer to inner):
file
class class AGameNetworkManager : public AInfo
Source code excerpt:
float ClientNetSendMoveDeltaTimeThrottled;
/** ClientNetSendMoveDeltaTimeStationary is used when players are determined to not be moving or changing their view. See ClientNetSendMoveDeltaTime for more info. */
UPROPERTY(GlobalConfig)
float ClientNetSendMoveDeltaTimeStationary;
/** When player net speed (CurrentNetSpeed, based on ConfiguredInternetSpeed or ConfiguredLanSpeed) is less than or equal to this amount, ClientNetSendMoveDeltaTimeThrottled is used instead of ClientNetSendMoveDeltaTime. */
UPROPERTY(GlobalConfig)
int32 ClientNetSendMoveThrottleAtNetSpeed;
/** When player count is greater than this amount, ClientNetSendMoveDeltaTimeThrottled is used instead of ClientNetSendMoveDeltaTime. */
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/CharacterMovementComponent.cpp:12444
Scope (from outer to inner):
file
function float UCharacterMovementComponent::GetClientNetSendDeltaTime
Source code excerpt:
if (Acceleration.IsZero() && Velocity.IsZero() && ClientData->LastAckedMove.IsValid() && ClientData->LastAckedMove->IsMatchingStartControlRotation(PC))
{
NetMoveDelta = FMath::Max(GameNetworkManager->ClientNetSendMoveDeltaTimeStationary, NetMoveDelta);
}
}
return NetMoveDelta;
}
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/GameNetworkManager.cpp:35
Scope (from outer to inner):
file
function AGameNetworkManager::AGameNetworkManager
Source code excerpt:
ClientNetSendMoveDeltaTime = 0.0166f;
ClientNetSendMoveDeltaTimeThrottled = 0.0222f;
ClientNetSendMoveDeltaTimeStationary = 0.0166f;
ClientNetSendMoveThrottleAtNetSpeed = 10000;
ClientNetSendMoveThrottleOverPlayerCount = 10;
ClientAuthorativePosition = false;
ClientErrorUpdateRateLimit = 0.0f;
ClientNetCamUpdateDeltaTime = 0.0166f;
ClientNetCamUpdatePositionLimit = 1000.0f;