beacon.DelayCancellationResponse
beacon.DelayCancellationResponse
#Overview
name: beacon.DelayCancellationResponse
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Delay time between received cancel 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.DelayCancellationResponse is to introduce a delay between receiving a cancellation response and notifying the game about it in the party and spectator beacon systems. This setting is primarily used for debugging and testing purposes in non-shipping builds.
This setting variable is relied upon by the OnlineSubsystemUtils module, specifically within the party and spectator beacon systems. These systems are part of Unreal Engine’s networking and multiplayer infrastructure.
The value of this variable is set through the Unreal Engine console variable system. It can be modified at runtime using console commands or through configuration files.
The associated variable CVarDelayCancellationResponse interacts directly with beacon.DelayCancellationResponse. They share the same value and purpose.
Developers must be aware that:
- This variable is only effective in non-shipping builds (#if !UE_BUILD_SHIPPING).
- It affects the timing of cancellation response notifications in both party and spectator beacon systems.
- The delay is measured in seconds.
Best practices when using this variable include:
- Use it primarily for debugging and testing network behavior.
- Be cautious when setting high values, as it may impact the responsiveness of the multiplayer system.
- Remember to reset it to 0 for normal gameplay or when not actively debugging.
Regarding the associated variable CVarDelayCancellationResponse:
- It serves the same purpose as beacon.DelayCancellationResponse.
- It’s implemented as a TAutoConsoleVariable
, allowing for easy runtime modification. - It’s used in both PartyBeaconClient and SpectatorBeaconClient classes to retrieve the delay value.
- The same considerations and best practices apply to this variable as to beacon.DelayCancellationResponse.
Developers should use these variables judiciously and mainly for debugging purposes, ensuring they don’t negatively impact the player experience in production environments.
#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:21
Scope (from outer to inner):
file
namespace BeaconConsoleVariables
Source code excerpt:
/** Time to delay delegates firing a cancel reservation request response */
TAutoConsoleVariable<float> CVarDelayCancellationResponse(
TEXT("beacon.DelayCancellationResponse"),
0.0f,
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 */
#Associated Variable and Callsites
This variable is associated with another variable named CVarDelayCancellationResponse
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Private/PartyBeaconClient.cpp:17
Scope (from outer to inner):
file
namespace BeaconConsoleVariables
Source code excerpt:
TEXT("Delay time between received response and notification\n")
TEXT("Time in secs"),
ECVF_Default);
/** Time to delay delegates firing a cancel reservation request response */
TAutoConsoleVariable<float> CVarDelayCancellationResponse(
TEXT("beacon.DelayCancellationResponse"),
0.0f,
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")
#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Private/PartyBeaconClient.cpp:539
Scope (from outer to inner):
file
function void APartyBeaconClient::ClientCancelReservationResponse_Implementation
Source code excerpt:
ensure(bCancelReservation);
// Clear out any pending response handling (including failsafe timer)
ClearTimers(false);
#if !UE_BUILD_SHIPPING
const float Rate = BeaconConsoleVariables::CVarDelayCancellationResponse.GetValueOnGameThread();
#else
const float Rate = 0.0f;
#endif
if (Rate > 0.0f)
{
UE_LOG(LogPartyBeacon, Verbose, TEXT("Party beacon cancellation response received %s, waiting %fs to notify"), EPartyReservationResult::ToString(ReservationResponse), Rate);
FTimerDelegate TimerDelegate;
TimerDelegate.BindLambda([this, ReservationResponse]()
{
ProcessCancelReservationResponse(ReservationResponse);
#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Private/SpectatorBeaconClient.cpp:17
Scope (from outer to inner):
file
namespace SpectatorBeaconConsoleVariables
Source code excerpt:
TEXT("Delay time between received response and notification\n")
TEXT("Time in secs"),
ECVF_Default);
/** Time to delay delegates firing a cancel reservation request response */
TAutoConsoleVariable<float> CVarDelayCancellationResponse(
TEXT("spectatorbeacon.DelayCancellationResponse"),
0.0f,
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")
#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Private/SpectatorBeaconClient.cpp:348
Scope (from outer to inner):
file
function void ASpectatorBeaconClient::ClientCancelReservationResponse_Implementation
Source code excerpt:
ensure(bCancelReservation);
// Clear out any pending response handling (including failsafe timer)
ClearTimers(false);
#if !UE_BUILD_SHIPPING
const float Rate = SpectatorBeaconConsoleVariables::CVarDelayCancellationResponse.GetValueOnGameThread();
#else
const float Rate = 0.0f;
#endif
if (Rate > 0.0f)
{
UE_LOG(LogSpectatorBeacon, Verbose, TEXT("Spectator beacon cancellation response received %s, waiting %fs to notify"), ESpectatorReservationResult::ToString(ReservationResponse), Rate);
FTimerDelegate TimerDelegate;
TimerDelegate.BindLambda([this, ReservationResponse]()
{
ProcessCancelReservationResponse(ReservationResponse);