AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Metamod:Source Plugins (https://forums.alliedmods.net/forumdisplay.php?f=76)
-   -   [CSGO/ANY?] ForceRate (https://forums.alliedmods.net/showthread.php?t=287906)

SM9 09-18-2016 00:26

[CSGO/ANY?] ForceRate
 
1 Attachment(s)
This is not my plugin, I have simply compiled it for Windows and created a Visual Studio solution to make it easier for others, I don't know how to compile it on Linux yet, sorry guys.

This is basically a choke fix for 128 tick servers, its apparently a better solution than changing net_splitrate or net_maxcleartime.

In this compiled version, I have also default the cvar net_forcerate to 2147483647 which is basically unlimited, You might want to decrease this if your server host has a bandwidth limit although this value appears to be fine on my servers.

This is the reddit post which explains more: https://www.reddit.com/r/GlobalOffen...28tick_servers.

Tobba 09-18-2016 05:38

Re: [CSGO/ANY?] ForceRate
 
1 Attachment(s)
Here's an updated version that should stop the crashing, it removes the use of a hook on GetDataRate (which was more of a holdover from trying to use a different method). I'm still not sure exactly why it crashed, but this should be far more stable.

decentLIVE 09-18-2016 09:36

Re: [CSGO/ANY?] ForceRate
 
It would be great if you could give a little install tutorial for noobs like me :)

SM9 09-18-2016 11:27

Re: [CSGO/ANY?] ForceRate
 
Quote:

Originally Posted by Tobba (Post 2454875)
Here's an updated version that should stop the crashing, it removes the use of a hook on GetDataRate (which was more of a holdover from trying to use a different method). I'm still not sure exactly why it crashed, but this should be far more stable.

Updated first post, cheers.

Quote:

Originally Posted by decentLIVE (Post 2454925)
It would be great if you could give a little install tutorial for noobs like me :)

Download the zip file in the first post and then copy the addons folder to your /csgo/ directory, Thats it :) (Assuming you are using Windows)

SM9 09-18-2016 13:51

Re: [CSGO/ANY?] ForceRate
 
Updated again with latest commit, can confirm crashes are fixed, Thanks!

Wilczek 09-18-2016 14:55

Re: [CSGO/ANY?] ForceRate
 
Could the SM developers confirm if this is safe to use, please?

psychonic 09-18-2016 15:17

Re: [CSGO/ANY?] ForceRate
 
Looks fine at a glance.

Wilczek 09-18-2016 16:01

Re: [CSGO/ANY?] ForceRate
 
Thank you :)

VPPGamingNetwork 09-18-2016 23:10

Re: [CSGO/ANY?] ForceRate
 
its safe to use guys since we were testing it on my servers. Great guy and thank you for doing this. Love you so much bro no homo!! 128 tick!!

Peace-Maker 09-19-2016 02:12

Re: [CSGO/ANY?] ForceRate
 
3 Attachment(s)
Here's this MM:S plugin as a sourcemod plugin.
Thanks to Drifter's example for getting an engine interface.

This adds the same convar "net_forcerate" which defaults to "0" - disabled.

Edit: Added a check to verify the CNetChan::m_Rate offset is correct before trying to change it.

crinis 09-19-2016 08:34

Re: [CSGO/ANY?] ForceRate
 
Thanks to both of you for the solutions.

I'm trying to use the Sourcemod plugin by Peace-Maker on a Linux server, but this leads to a crash on player disconnect. Using latest Linux sourcemod build 5929. A self-compiled version of the Plugin on Linux leads to the same error.

Would be nice to hear if someone else got the same problem on a Linux server.

Quote:

19.9.2016 14:21:29Dropped Zalamander from server: Disconnect
19.9.2016 14:21:29*** Error in `./srcds_linux': munmap_chunk(): invalid pointer: 0x0c1a0004 ***
19.9.2016 14:21:29PreMinidumpCallback: updating dump comment
19.9.2016 14:21:29crash_20160919120647_1.dmp[188]: Uploading dump (out-of-process)
19.9.2016 14:21:29crash_20160919120647_1.dmp[188]: Uploading dump (out-of-process)
19.9.2016 14:21:29/tmp/dumps/crash_20160919120647_1.dmp
19.9.2016 14:21:29/tmp/dumps/crash_20160919120647_1.dmp
19.9.2016 14:21:29
Regards,
Crinis

Wilczek 09-19-2016 12:56

Re: [CSGO/ANY?] ForceRate
 
Unfortunately, Peace-Maker's plugin leads to a crash on Windows as well.

Peace-Maker 09-19-2016 14:17

Re: [CSGO/ANY?] ForceRate
 
It does exactly the same thing as Tobba's plugin, so it will have the same flaws. Though the linux offset for m_Rate was changed to 280 as well in the latest gist, so you might want to try changing it in the gamedata on linux.
I've added a check to compare the value at the offset with the output from GetDataRate, to verify the offset is correct. This should at least prevent crashes due to a bad offset.

Wilczek 09-19-2016 14:42

Re: [CSGO/ANY?] ForceRate
 
Actually it doesn't seem like crashing due to a wrong offset - the server was working for a few minutes, players were connecting and disconnecting, but then it hang up and had to be manually restarted.

crinis 09-19-2016 15:56

Re: [CSGO/ANY?] ForceRate
 
Thanks. Hasn't crashed on Linux for me yet. Will continue testing tomorrow.

Edit after one day of testing:
Used the Sourcemod Plugin for a day on a full 20 slot DM server without choke or crashes.

Deadhuntz 09-23-2016 01:42

Re: [CSGO/ANY?] ForceRate
 
can anyone give me a linux binary?
would be pretty awesome :D

Wilczek 09-23-2016 11:54

Re: [CSGO/ANY?] ForceRate
 
You don't need it, yesterday CSGO patch allowed to push rate up to 786432.

versatile_bfg 09-29-2016 07:35

Re: [CSGO/ANY?] ForceRate
 
so this is useless now? or should I still install this on the servers?

Bacardi 09-29-2016 08:28

Re: [CSGO/ANY?] ForceRate
 
Quote:

Originally Posted by versatile_bfg (Post 2457850)
so this is useless now? or should I still install this on the servers?

Don't install :wink:

Use server cvars
sv_minrate 200000
sv_maxrate 0

versatile_bfg 10-02-2016 20:34

Re: [CSGO/ANY?] ForceRate
 
Quote:

Originally Posted by Bacardi (Post 2457859)
Don't install :wink:

Use server cvars
sv_minrate 200000
sv_maxrate 0

thanks :)

Visual77 10-09-2016 13:21

Re: [CSGO/ANY?] ForceRate
 
just tried a compiled version on l4d2 and it dosen't work.
max rate on client is still 30000, hardcoded max value too. used net_forcerate 2147483647

BASTIEN1 08-18-2017 16:51

Re: [CSGO/ANY?] ForceRate
 
Quote:

Originally Posted by Peace-Maker (Post 2455154)
Here's this MM:S plugin as a sourcemod plugin.
Thanks to Drifter's example for getting an engine interface.

This adds the same convar "net_forcerate" which defaults to "0" - disabled.

Edit: Added a check to verify the CNetChan::m_Rate offset is correct before trying to change it.

[net_forcerate.smx] Rate offset might be wrong. Actual rate: 450000, Rate at offset: 779679272

scorpius2k1 09-16-2021 17:09

Re: [CSGO/ANY?] ForceRate
 
Quote:

Originally Posted by Peace-Maker (Post 2455154)
Here's this MM:S plugin as a sourcemod plugin.
Thanks to Drifter's example for getting an engine interface.

This adds the same convar "net_forcerate" which defaults to "0" - disabled.

Edit: Added a check to verify the CNetChan::m_Rate offset is correct before trying to change it.

Great addon! I had stumbled across this post because I am having the same issues on a properly configured server and would like to enforce rates -- is it possible to use on other source engine games like CSS or even TF2? I have configured the 'net_forcerate.games.txt' properly to recognize both as a test (tf2 and css key instead of csgo), the plugin loads properly without any errors. However, it stops at at line #102 in the function SetRate. Do I maybe need different offsets, etc in the 'net_forcerate.games.txt' file to match something different? Not sure what to do otherwise.

Many thanks. :bacon!:

PHP Code:

void SetRate(int clientint forcerate)
{
    
Address netchannel GetPlayerNetInfo(client);
    if (
netchannel == Address_Null// Line #102, STOPS HERE AS Address_Null
        
return;

    
Address rateaddr netchannel view_as<Address>(m_RateOffset);
    if (
LoadFromAddress(rateaddrNumberType_Int32) != GetClientDataRate(client))
        
LogError("Rate offset might be wrong. Actual rate: %d, Rate at offset: %d"GetClientDataRate(client), LoadFromAddress(rateaddrNumberType_Int32));
    else
        
StoreToAddress(rateaddrforcerateNumberType_Int32);




All times are GMT -4. The time now is 14:04.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.