Raised This Month: $ Target: $400

[CSS & CS:GO] RNGFix (v1.1.2b, 2018-12-06)

Post New Thread Reply   
Thread Tools Display Modes
Junior Member
Join Date: Feb 2017
Plugin ID:
Plugin Version:
Plugin Category:
Plugin Game:
Plugin Dependencies:
    Servers with this Plugin:
    Plugin Description:
    Fixes physics bugs in movement game modes
    Old 09-22-2018 , 00:50   [CSS & CS:GO] RNGFix (v1.1.2b, 2018-12-06)
    Reply With Quote #1


    This plugin fixes a number of physics bugs that show up in movement-based game modes like bhop and surf. These issues are related in that they all appear to happen at random – as far as a human player can tell.

    Another plugin, Slope Landing Fix (Slopefix), fixes the first of these issues (downhill inclines) and is seen as a necessity for both bhop and surf. RNGFix follows the spirit of this plugin by expanding on it with fixes for many more pseudo-random bugs.

    Nothing this plugin does is impossible otherwise – it just keeps random chance from mattering.

    Downhill Inclines

    Sometimes a player will not be "boosted" when falling onto an inclined surface, specifically while moving downhill. This fix results in the player always getting boosted. This is the scenario addressed by the original Slopefix. RNGFix also implements this fix in a way that does not cause double boosts when a trigger_push is on the incline, which is a problem the original Slopefix had.

    Uphill Inclines

    When bhopping up an incline, sometimes the player loses speed on the initial jump, and sometimes they do not. This fix makes it so the player never loses speed in this scenario, as long as it was possible for the player to not lose speed, if not for the "luck" factor that makes this random. On shallow inclines and uneven ground, this means you will no longer randomly lose small amounts of speed when jumping, and on steep inclines this means you no longer need to land sideways and then turn directly up them, which was just a method for maximizing favorable odds.

    Trigger Jumping

    Triggers that extend less than 2 units above the ground can sometimes be "jumped on" without activating them. This fix prevents this bug from occuring. This fixes annoyances like jumping on thin boosters without activating them, as well as exploitable behavior such as jumping on thin teleport triggers without activating them.


    It is possible to pass through a teleport trigger so quickly that you also collide with the wall (or floor) behind it before actually being teleported, despite touching the teleporter "first". This fix makes it impossible to both collide with a surface and activate a teleport in the same tick. This is most notably useful on staged bhop maps with thin stage-end teleports positioned against walls; with this fix you no longer need to go through them at an angle just to maximize the odds of keeping your speed.

    Edge Bugs

    When moving at high speed and landing on the extreme trailing edge of a platform, it is possible to collide with the surface -- resulting in a loss of vertical speed -- but without jumping, despite pressing jump in time (or holding jump with auto-bhop enabled). This fix causes the player to always be able to jump in this scenario. Note that you are still able to slide off by not pressing jump, if you wish to do so.

    Stair Sliding (Surf Only)

    The Source engine lets you move up stairs without requiring you to actually jump up each step -- as if the stairs were a simple incline -- and if you are moving fast this means you can slide up them quickly as well (on CSGO, sliding requires Movement Unlocker). However, if you are airborne and try to land on them at high speed, you may collide with the vertical face of a stair step before landing on top of a step, which results in a loss of speed and likely no slide. In the interest of making the incline-like behavior of stairs more consistent, this fix lets you slide up stairs when landing on them even if you hit the side of a stair step before the top of one.

    This fix will only be applied on surf maps (maps starting with "surf_") because it has undesirable side-effects on bhop maps. It is also unlikely to be useful on bhop.

    More Info
    Once again, all of these issues have random behavior that is effectively beyond the player's control. They are not literally random -- you can simulate the same scenario repeatedly with the same initial conditions and get the same result -- but the scale at which the initial conditions make a difference is imperceptible to the player. Think of it like when you roll a pair of dice on a table: you could take a very powerful supercomputer and simulate the dice after they leave your hand and know ahead of time how they will end up, but for all intents and purposes we consider rolling dice to be "random" because the slightest, even imperceptible change in initial conditions can alter the results unpredicably.

    You might be worried that this plugin makes things "easier" for the player, and while that is certainly true, that is only because being reliant on random chance is "hard" in the first place. These fixes simply detect when random chance comes into play, and always gives the player "good RNG" -- beyond that, the game functions normally.

    This plugin is logically complex, so I have written a technical explanation of how these fixes work here. Please let me know of any questions or concerns about this plugin; I'm happy to explain anything from the code or the broader way these fixes are implemented. Any suggestions for additional fixes that fit the theme of this plugin are also welcome.

    This plugin does perform a handful of traces and a bit of math for each client on each tick, however the Source engine is well-equipped for this, and in fact this plugin has been running on a fairly active server for the last six months with no apparent issues. I have done my best to make it work as efficiently as possible.

    CSS and CS:GO are the most prominent games for movement-based game modes so I have supported them to begin with, but if there is a desire for support for other games it could certainly be added.

    The fixes can be disabled individually by setting the following cvars to "0" in this plugin's cfg file. All are enabled by default.


    • SourceMod 1.10 - Build 6326 or newer - The trigger jumping fix makes use of trace functionality added to SourceMod in August 2018.
    • DHooks
    • (Optional, CS:GO) Movement Unlocker - Enables sliding on CS:GO. If you don't care about sliding on surf and the stair sliding fix, you don't need this.
    Also, remember that you should stop using Slopefix if using this plugin.

    Special Thanks
    Mev and Blacky - For creating the original Slopefix
    SlidyBat - For getting the ball rolling on adding new ray trace functionality to SourceMod
    BorkChops - For help testing, and putting up with me

    Version History
    1.0.0 - Initial release
    1.1.0 - Removed necessity for extra extension, consolidated gamedata
    1.1.1 - Accounted for teleport hub boxes, where the telehop fix should not be applied
    1.1.2 - Fix for getting stuck after teleporting under certain specific conditions
    1.1.2c - Updated gamedata for CSGO's Danger Zone update



    Last edited by rio_; 12-07-2018 at 02:48.
    rio_ is offline
    Senior Member
    Join Date: Nov 2016
    Old 09-22-2018 , 01:09   Re: [CSS & CS:GO] RNGFix (v1.0, 2018-09-21)
    Reply With Quote #2

    butare is offline
    AlliedModders Donor
    Join Date: Apr 2017
    Location: Poland
    Old 09-22-2018 , 01:50   Re: [CSS & CS:GO] RNGFix (v1.0, 2018-09-21)
    Reply With Quote #3

    This guy just saved bhop.
    cytrus224 is offline
    Junior Member
    Join Date: Jun 2017
    Old 09-22-2018 , 02:17   Re: [CSS & CS:GO] RNGFix (v1.0, 2018-09-21)
    Reply With Quote #4

    Thanks, looks promising!
    kidfearless is offline
    SourceMod Moderator
    Join Date: Feb 2015
    Location: USA
    Old 09-22-2018 , 05:48   Re: [CSS & CS:GO] RNGFix (v1.0, 2018-09-21)
    Reply With Quote #5

    Plugin of the year, without a doubt.

    Just a heads up, I've been able to reproduce a consistent crash while running the plugin and Cmdfix - once removed, the crash goes away. Loading the extension with cmdfix works just fine.
    sneaK is offline
    AlliedModders Donor
    Join Date: Apr 2005
    Old 09-22-2018 , 06:55   Re: [CSS & CS:GO] RNGFix (v1.0, 2018-09-21)
    Reply With Quote #6

    "Edge bugs"

    This fix causes the player to always be able to jump in this scenario.

    What if you edge bug on a trigger?
    Proz is offline
    Veteran Member
    Join Date: May 2017
    Old 09-22-2018 , 14:15   Re: [CSS & CS:GO] RNGFix (v1.0, 2018-09-21)
    Reply With Quote #7

    Taking paid private requests! Contact me
    Cruze is offline
    Junior Member
    Join Date: Feb 2017
    Old 09-22-2018 , 18:39   Re: [CSS & CS:GO] RNGFix (v1.0, 2018-09-21)
    Reply With Quote #8

    Originally Posted by Proz View Post
    "Edge bugs"

    This fix causes the player to always be able to jump in this scenario.

    What if you edge bug on a trigger?
    The edge bug fix will also lead you to activate any triggers on the ground where you would have edge bugged.
    rio_ is offline
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 09-22-2018 , 19:00   Re: [CSS & CS:GO] RNGFix (v1.0, 2018-09-21)
    Reply With Quote #9

    good stuff
    shavit is offline
    Veteran Member
    Join Date: Sep 2008
    Old 09-22-2018 , 20:25   Re: [CSS & CS:GO] RNGFix (v1.1, 2018-09-22)
    Reply With Quote #10

    Very nice!
    lazarev is offline

    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump

    All times are GMT -4. The time now is 07:22.

    Powered by vBulletin®
    Copyright ©2000 - 2023, vBulletin Solutions, Inc.
    Theme made by Freecode