Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
Since the cl_interp value appears to be recorded in the config.cfg, I think this wouldn't revert the cl_interp default for anyone who has run the game before and/or has the value in their config, so maybe we should also add a block similar to 3dee619 based on the release version to manually update any |
|
Also I feel like we could set the |
Yeah this would be good Would something like this work (I'll get around to learning some c++ one day)? if (iCfgVerMajor < 25)
{
...
ConVarRef interp("cl_interp");
if (interp.IsValid())
{
interp.SetValue(0.0f);
}
}
Yeah, I think this should be possible, I was trying to be conservative in the changes, but probably makes sense to set the default for this cvar to 0. I don't fully understand the new code addition in |
Yeah, that seems good. But since the current release is version 25, we should check for the next future major release (< 26, or <= 25), because we also want to fix the v25 configs. Also rather than unconditionally resetting the cvar: ConVarRef interp("cl_interp");
if (interp.IsValid())
{
constexpr float oldDefaultValue = 0.1;
if (interp.GetFloat() == oldDefaultValue)
{
interp.Revert();
}
}or similar. Because we wouldn't want to forcibly overwrite changes made by the user to the cvar value, except for the cases where the value was left unchanged from the old default. |
|
Also when i was testing this out earlier i noticed that with host_timescale 0.1 I would teleport a lot |
Remove cl_interp in favour of cl_interp_ratio. cl_interp requires the user to calculate the optimal net settings from their current updaterate and is not very user-friendly. Instead, simply remove it and use the cl_interp_ratio, which does it automatically with sensible defaults. With the cl_updaterate default change from 20 to 66 (the sv_maxupdaterate default value), this gives us a new default interp of 2/66 = 0.03030... instead of the old 0.1. Users who for whatever reason enjoy 100 ms extra latency could still roll back the cl_updaterate to value 20, which with interp_rate 2 would then give them the original cl_interp: 2/20 = 0.1 Users who wish to get an even lower interp can adjust cl_interp_ratio to 1 for cl_interp equivalent of: 1/66 = 0.01515... which is quite common for comp. But since a dropped packet would cause visible stuttering with this setting, we probably don't want to make it the default. Servers however can control this with sv_maxupdaterate and sv_minupdaterate if they so choose.
0.033 -> 0.0303030...
|
Pushing some changes with go-ahead from @bauxiteDYS This probably needs some testing. I got fed up with fighting the ServerBounded system for cl_interp, and it was just a weird layer of abstraction over the interp rate, so I decided to remove it entirely in favor of purely using cl_interp_rate. For the full rationale, see commit message: 43e2558 |
|
@AdamTadeusz Could you test if you're seeing any stuttering with the current PR head? You can set the effective interp with: |
Putting this here for more info, unsure if other source games also do this but the default in neo for However I'm not opposed to removing cl_interp entirely, it probably should be removed anyway. |
We can see in the SDK code
FIXME_INTERP_RATIO, I believe this is because thecl_interpvalue is being used instead ofcl_interp_ratioif it's larger and I don't really believe that's how it should work, probably ideally want clients to have the lowest interp they asked for between the two.This doesn't change all that behaviour, it's a very quick fix that just changes the default
cl_interpto match a resulting value when default ratio of 2 is used assumingcl_updaterate 66(clamped by server). Also we don't allow clients to further increase their interp beyond 0.1s, as it's not necessary and causes greater problems in lag comp, not to mention typos and bad configs reducing the quality of the gameplay experience.Unfortunately defaults for cl_cmdrate and cl_updaterate live in the engine so can't be changed at the moment, but these can be enforced by server settings which most server operators already do.
Ideally the clients would get the minimum interp they have asked for or the minimum server enforced interp if there is one.
Maybe this is good enough for now?