I saw this question about raising UE’s network bandwidth. The accepted answer suggests modifying the following config variables on GameNetworkManager:
TotalNetBandwidth=32000
MaxDynamicBandwidth=7000
MinDynamicBandwidth=4000
I’m trying to follow the engine source code to see how the config values mentioned in the accepted answer have any effect.
I am looking inside AGameNetworkManager::UpdateNetSpeeds, which propagates the calculated net speed to the player controllers, but there is no code in the engine that ever calls this method. There is a timer that should run once per second to run this method, but the only thing that activates the timer is this method itself.
void AGameNetworkManager::UpdateNetSpeeds(bool bIsLanMatch)
{
// Don't adjust net speeds for LAN matches or dedicated servers
ENetMode NetMode = GetNetMode();
if ( (NetMode == NM_DedicatedServer) || (NetMode == NM_Standalone) || bIsLanMatch )
{
return;
}
if ( GetWorld()->TimeSeconds - LastNetSpeedUpdateTime < 1.0f )
{
GetWorldTimerManager().SetTimer(TimerHandle_UpdateNetSpeedsTimer, this, &AGameNetworkManager::UpdateNetSpeedsTimer, 1.0f);
return;
}
LastNetSpeedUpdateTime = GetWorld()->TimeSeconds;
int32 NewNetSpeed = CalculatedNetSpeed();
UE_LOG(LogNet, Log, TEXT("New Dynamic NetSpeed %i vs old %i"), NewNetSpeed, AdjustedNetSpeed);
if ( AdjustedNetSpeed != NewNetSpeed )
{
AdjustedNetSpeed = NewNetSpeed;
for( FConstPlayerControllerIterator Iterator = GetWorld()->GetPlayerControllerIterator(); Iterator; ++Iterator )
{
(*Iterator)->SetNetSpeed(AdjustedNetSpeed);
}
}
}
What am I missing? As far as I can tell these variables are meaningless.
Edit: No one is proving me crazy, so moved to bug reports.