View Single Post
Old 01-19-2017, 12:17 PM   #41
Anonymous[Lolz]
Getting there...
 
Anonymous[Lolz]'s Avatar
 
Join Date: Feb 2009
Location: New York State
Posts: 888
Default
Reply With Quote


Quote:
Originally Posted by -Goose- View Post
Setting your clientside netspeed will not actually cause the server to send you more data (you can easily see you will not exceed the 10,000 b/s rate even if you set it to 15 or 20k). It only uncaps your framerate and will allow you to send more data to the server.

The only way I have ever been able to get UT to actually send more data involved issuing a series of commands with admin rights to the server after a map has started. Unfortunately, this has to be reapplied each and every map, so it is a no go unless someone makes it a server actor or mutator. Even then, raising the number to say 20,000 does double the bandwidth requirement of the server from ~2.7 to 5.4 Mbps Up rate.
Is this it?
Code:
class LDGNetSpeedAntiTccSecAddon extends UnrealSecurity
    hidecategories(Movement,Collision,Lighting,LightColor,Karma,Force);

var PlayerController MyOwner;

replication
{
    // Pos:0x000
    reliable if(Role < ROLE_Authority)
        ReplaceSecurity
}

simulated function PostNetBeginPlay()
{
    local bool plrDirty;
    local int tcpMaxInternetRate, tcpMaxRate;

    // End:0x252
    if(Level.NetMode == NM_Client)
    {
        MyOwner = Level.GetLocalPlayerController();
        // End:0x248
        if(MyOwner != none)
        {
            // End:0x87
            if((class'Player'.default.ConfiguredInternetSpeed < 20000) && class'Player'.default.ConfiguredInternetSpeed > 9500)
            {
                class'Player'.default.ConfiguredInternetSpeed = 20000;
                plrDirty = true;
            }
            // End:0xBB
            if(class'Player'.default.ConfiguredLanSpeed < 20000)
            {
                class'Player'.default.ConfiguredLanSpeed = 20000;
                plrDirty = true;
            }
            // End:0xD3
            if(plrDirty)
            {
                class'Player'.static.StaticSaveConfig();
            }
            tcpMaxInternetRate = int(MyOwner.ConsoleCommand("get TcpNetDriver MaxInternetClientRate"));
            // End:0x15F
            if(tcpMaxInternetRate < 20000)
            {
                MyOwner.ConsoleCommand("set TcpNetDriver MaxInternetClientRate 20000");
            }
            tcpMaxRate = int(MyOwner.ConsoleCommand("get TcpNetDriver MaxClientRate"));
            // End:0x1DB
            if(tcpMaxRate < 20000)
            {
                MyOwner.ConsoleCommand("set TcpNetDriver MaxClientRate 20000");
            }
            // End:0x23F
            if((MyOwner.Player.CurrentNetSpeed < 20000) && MyOwner.Player.CurrentNetSpeed > 9500)
            {
                MyOwner.ConsoleCommand("netspeed 20000");
            }
            ReplaceSecurity();
        }
        // End:0x24F
        else
        {
            GotoState('ClientNotInitialized');
        }
    }
    // End:0x26B
    else
    {
        // End:0x26B
        if(Role == ROLE_Authority)
        {
            SetTimer(15.0, false);
        }
    }
    //return;    
}

function Timer()
{
    ReplaceSecurity();
    //return;    
}

function ReplaceSecurity()
{
    PlayerController(Owner).PlayerSecurity = UnresolvedNativeFunction_97(class'AntiTCCSecurity', Owner);
    Destroy();
    //return;    
}

state ClientNotInitialized
{
    simulated function Tick(float DeltaTime)
    {
        MyOwner = Level.GetLocalPlayerController();
        // End:0x2D
        if(MyOwner != none)
        {
            PostNetBeginPlay();
            GotoState('None');
        }
        //return;        
    }
    stop;    
}

defaultproperties
{
    bOnlyRelevantToOwner=true
    RemoteRole=2
}
Anonymous[Lolz] is offline