Open Derpduck opened 2 years ago
The plugin seems to print different values every now and then, even when standing still at the exact same spot.
If you were to use math then the ideal sv_gravity
for 100 tickrate based on your findings would be 773 (rounded). 🤔
I don't think there is an ideal gravity, gravity shouldn't be changed because it's a constant and the issue here is the rate of acceleration. Really we should modify the amount of fall damage taken since that is the only real issue at default gravity.
Inconsistencies with the plugin might just be a timing/rounding issue.
Not sure how we arrived at this value for sv_gravity: https://github.com/SirPlease/L4D2-Competitive-Rework/blob/master/addons/sourcemod/scripting/TickrateFixes.sp#L132 But it doesn't seem to accurately mimic 30 tick / 800 sv_gravity behaviour, I think this value could be improved.
Jump height is not significantly changed by tickrate, however the time to land from a jump is different. Fall damage is affected, as it seems the acceleration while falling is different.
I did some testing with different tickrates and sv_gravity settings, some results below:
(Tried testing on 90 tick but the results weren't worth including, they were not much different than 100 tick so changing to 90 tick would not be an improvement)
I found a value of 765 for sv_gravity to be closer to default than the current value, but it could still use some adjustment. For smaller falls fall damage will be increased compared to normal, then at ~35 the damage starts being reduced compared to normal. This value still needs some adjustment, very small amounts of fall damage are increased, such as falls that do <1 damage on default settings, these can deal >1 damage on 765 gravity.
Plugin used for testing: https://github.com/Derpduck/Derpduck-L4D2-Scripts/blob/main/sourcemod/scripting/measure_jumps.sp