beacon.DelayUpdateResponse
beacon.DelayUpdateResponse
#Overview
name: beacon.DelayUpdateResponse
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Delay time between received update response and notification\nTime in secs
It is referenced in 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of beacon.DelayUpdateResponse is to introduce a delay between receiving a reservation update response and notifying the client in the party and spectator beacon systems. This setting is primarily used for debugging and testing purposes in non-shipping builds of the game.
This setting variable is utilized by the Online Subsystem Utils plugin, specifically within the party beacon and spectator beacon modules. These beacons are part of Unreal Engine’s networking and multiplayer infrastructure.
The value of this variable is set through the Unreal Engine’s console variable system. It can be modified at runtime using console commands or through configuration files.
The associated variable CVarDelayUpdateResponse directly interacts with beacon.DelayUpdateResponse. They share the same value and purpose, with CVarDelayUpdateResponse being the actual TAutoConsoleVariable object used in the code.
Developers must be aware that:
- This variable only affects non-shipping builds (DEBUG, DEVELOPMENT, etc.).
- Setting a non-zero value will introduce artificial delays in the reservation update process, which can impact the responsiveness of the multiplayer system.
- The delay is measured in seconds.
Best practices when using this variable include:
- Use it only for debugging and testing purposes.
- Reset it to 0.0f for production or performance testing.
- Be cautious when setting high values, as it may negatively impact the player experience.
- Consider using it in conjunction with logging to diagnose timing-related issues in the reservation system.
Regarding the associated variable CVarDelayUpdateResponse: Its purpose is to provide a programmatic interface to the beacon.DelayUpdateResponse setting. It allows the code to retrieve the current delay value and apply it in the reservation update process. The usage and considerations are the same as for beacon.DelayUpdateResponse, as they represent the same setting in different forms (console variable name and TAutoConsoleVariable object).
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Private/PartyBeaconClient.cpp:29
Scope (from outer to inner):
file
namespace BeaconConsoleVariables
Source code excerpt:
/** Time to delay delegates firing a reservation update response */
TAutoConsoleVariable<float> CVarDelayUpdateResponse(
TEXT("beacon.DelayUpdateResponse"),
0.0f,
TEXT("Delay time between received update response and notification\n")
TEXT("Time in secs"),
ECVF_Default);
/** Time to delay delegates firing a reservation full response */
#Associated Variable and Callsites
This variable is associated with another variable named CVarDelayUpdateResponse
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Private/PartyBeaconClient.cpp:25
Scope (from outer to inner):
file
namespace BeaconConsoleVariables
Source code excerpt:
TEXT("Delay time between received cancel response and notification\n")
TEXT("Time in secs"),
ECVF_Default);
/** Time to delay delegates firing a reservation update response */
TAutoConsoleVariable<float> CVarDelayUpdateResponse(
TEXT("beacon.DelayUpdateResponse"),
0.0f,
TEXT("Delay time between received update response and notification\n")
TEXT("Time in secs"),
ECVF_Default);
/** Time to delay delegates firing a reservation full response */
TAutoConsoleVariable<float> CVarDelayFullResponse(
TEXT("beacon.DelayFullResponse"),
0.0f,
TEXT("Delay time between received full response and notification\n")
#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Private/PartyBeaconClient.cpp:578
Scope (from outer to inner):
file
function void APartyBeaconClient::ClientSendReservationUpdates_Implementation
Source code excerpt:
void APartyBeaconClient::ClientSendReservationUpdates_Implementation(int32 NumRemainingReservations)
{
if (!bCancelReservation)
{
#if !UE_BUILD_SHIPPING
const float Rate = BeaconConsoleVariables::CVarDelayUpdateResponse.GetValueOnGameThread();
#else
const float Rate = 0.0f;
#endif
if (Rate > 0.0f)
{
UE_LOG(LogPartyBeacon, Verbose, TEXT("Party beacon reservations remaining %d, waiting %fs to notify"), NumRemainingReservations, Rate);
FTimerDelegate TimerDelegate;
TimerDelegate.BindLambda([this, NumRemainingReservations]()
{
ProcessReservationUpdate(NumRemainingReservations);
#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Private/SpectatorBeaconClient.cpp:25
Scope (from outer to inner):
file
namespace SpectatorBeaconConsoleVariables
Source code excerpt:
TEXT("Delay time between received cancel response and notification\n")
TEXT("Time in secs"),
ECVF_Default);
/** Time to delay delegates firing a reservation update response */
TAutoConsoleVariable<float> CVarDelayUpdateResponse(
TEXT("spectatorbeacon.DelayUpdateResponse"),
0.0f,
TEXT("Delay time between received update response and notification\n")
TEXT("Time in secs"),
ECVF_Default);
/** Time to delay delegates firing a reservation full response */
TAutoConsoleVariable<float> CVarDelayFullResponse(
TEXT("spectatorbeacon.DelayFullResponse"),
0.0f,
TEXT("Delay time between received full response and notification\n")
#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Private/SpectatorBeaconClient.cpp:387
Scope (from outer to inner):
file
function void ASpectatorBeaconClient::ClientSendReservationUpdates_Implementation
Source code excerpt:
void ASpectatorBeaconClient::ClientSendReservationUpdates_Implementation(int32 NumRemainingReservations)
{
if (!bCancelReservation)
{
#if !UE_BUILD_SHIPPING
const float Rate = SpectatorBeaconConsoleVariables::CVarDelayUpdateResponse.GetValueOnGameThread();
#else
const float Rate = 0.0f;
#endif
if (Rate > 0.0f)
{
UE_LOG(LogSpectatorBeacon, Verbose, TEXT("Spectator beacon reservations remaining %d, waiting %fs to notify"), NumRemainingReservations, Rate);
FTimerDelegate TimerDelegate;
TimerDelegate.BindLambda([this, NumRemainingReservations]()
{
ProcessReservationUpdate(NumRemainingReservations);