Open TheSil opened 9 years ago
Now looking at it, it is actually used for frametime as supposed to be, so +1/+0 wont do the trick. I think best will be to add something like level.frameTime that will hold the actual frameTime value. I only wonder what effects it will have overall...
Added in 17ddd723c2bbc for test. It seems to be working alright so far.
This one d7e0193e4b is also related, it seems they wanted to do something on 1/2 frame period which does not really make sense, and caused an issue when frameTime refers to actual frame time...
Would it be possible to get the basejka knockback/launch effects, with all the other benefits of frametime?
And what exactly this is? I have tried rocket jumping for example and it seems to be working same way as in basejka.
If you roll over mines(common siege tactic) your launch trajectory is a lot bigger vertically and a lot smaller horizontally.
Just placed mines on the ground and rolled over it and i am getting on average same velocities for both, frametime being fixed value and frametime being 100 ms. Also visualy i dont notice any difference.
Currently FRAMETIME is constant defined as 100 (ms). This would make sense if server would only run on 10 Hz, but since this is driven dynamically, this value does not yield correct results.
Little ugly but working solution would be to change all occurences of
to something like
or
This would ensure it will be evaluated on next frame. Last one is a little tricky in case there are some hidden recursions that would lead to running multiple times (or maybe infinitely many times) during single frame, the +1 should work alright though.
EDIT: Eventually i have chosen to add level.frameTime variable which is set to sv_fps/1000, and referencing code to it.