Author
|
|
Junior Member
|
Plugin ID:
|
6272
|
Plugin Version:
|
1.1.2b
|
Plugin Category:
|
Gameplay
|
Plugin Game:
|
Any
|
Plugin Dependencies:
|
|
Servers with this Plugin:
|
|
| |
Plugin Description:
|
Fixes physics bugs in movement game modes
|
|
|
09-21-2018
, 23:50
[CSS & CS:GO] RNGFix (v1.1.2b, 2018-12-06)
|
#1
|
RNGFix
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.
Fixes
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.
Telehops
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.
Settings
The fixes can be disabled individually by setting the following cvars to "0" in this plugin's cfg file. All are enabled by default.
Code:
rngfix_downhill
rngfix_uphill
rngfix_triggerjump
rngfix_telehop
rngfix_edge
rngfix_stairs
Dependencies
- 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 ThanksMev 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 History1.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
Packages
Source
Last edited by rio_; 12-07-2018 at 01:48.
|
|
|
|