Skip to content

Conversation

@ppaulis
Copy link
Contributor

@ppaulis ppaulis commented Nov 2, 2025

The TV_DELAY variable currently has no effect. It only writes it into the server.cfg file. However, it is overruled by the tv_delay value in gamemode_competitive.cfg (and probably it's the same for other game modes).

This PR fixed the problem for me in competitive games. If, however, you prefer a more global solution for all game modes, let me know, and I'll adapt the code.

Best regards,
Pascal

Copy link
Owner

@joedwards32 joedwards32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

I think we should sed gamemode_*.cfg.

If someone has set the environment variable it is reasonable for them to expect it to apply to all game modes.

@ppaulis
Copy link
Contributor Author

ppaulis commented Nov 4, 2025

I agree!
I'll make the modification in the next days and give you a heads-up :-)

Thanks,

@Peeetman
Copy link
Contributor

I tested a delayed cstv setup using tv_delay 7.

tv_status and manual inspection of the *.cfg files confirm that everything is configured correctly. Thanks for your work on this, @ppaulis. When connecting to the master cstv (no intermediate relay/proxy) on port 27020, the game-client disconnects after roughly 30–100 seconds with the reason NETWORK_DISCONNECT_BADDELTATICK.

I'm not sure if this is the right place to bring it up, but do you have any idea what might be causing this or whether it is related to the current changes? I honestly don't think it is. If necessary, I can create a separate issue. I would appreciate any guidance.

Logs from the game (Workshop Console):

[#2968270094 UDP steamid:[email protected]:27020 'server'] closed by peer (2027): NETWORK_DISCONNECT_BADDELTATICK
Steam Net connection #2968270094 UDP steamid:[email protected]:27020 'server' closed by peer, reason 2027: NETWORK_DISCONNECT_BADDELTATICK
Netchan 'server' closed unexpectedly: NETWORK_DISCONNECT_BADDELTATICK
Closing Steam Net Connection on socket 'client' to 10.10.10.15:27020, handle #2968270094 (0 (null))
CloseSteamNetConnection handle #2968270094 (userdata 0)
Disassociating NetChan server @ 10.10.10.15:27020 (10.10.10.15:27020) from Steam Net Connection handle #2968270094 (userdata 0)
Removing Steam Net Connection for 10.10.10.15:27020, handle #2968270094
Disconnection during connection phase. Sign-on state: 6 (SIGNONSTATE_FULL). Disconnect reason: 27 (NETWORK_DISCONNECT_BADDELTATICK).
Disconnected from server: NETWORK_DISCONNECT_BADDELTATICK
ClientModeCSNormal::OnEvent OnEngineDisconnectReason {
reason int( 27 = 0x1B )
}

@Peeetman
Copy link
Contributor

Peeetman commented Nov 16, 2025

the game-client disconnects after roughly 30–100 seconds with the reason NETWORK_DISCONNECT_BADDELTATICK.

I identified the root cause of the issue, and it is not related to the container setup, the compose configuration, or the CSTV implementation included here.

In short, the disconnects were caused by the newly added delta-tick enforcement and not by anything in this PR.

Valve introduced a new server command on 27 November 2024:

sv_deltaticks_enforce

With its default value (2), the server will kick all clients if their delta-tick acknowledgements are not received strictly in order. In my case, this caused CSTV to disconnect after roughly 30–100 seconds with:

NETWORK_DISCONNECT_BADDELTATICK

Setting the value to:

sv_deltaticks_enforce 0

immediately resolves the issue. With enforcement disabled, the client stays connected to CSTV without any disconnects.
Tested with tv_delay 7 and a direct connection to the CSTV master (no proxy).

I’ll open an issue to document this behavior so others who encounter the same problem can resolve it quickly.

Edit: Opened an issue and resolved it #194

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants