From 187d12ac85e9474c62c69bed800991b5b0050efd Mon Sep 17 00:00:00 2001 From: John Edwards Date: Fri, 27 Oct 2023 11:24:04 +0100 Subject: [PATCH] Expanded CSTV options to include snapshot rate and delay. --- README.md | 2 ++ bullseye/Dockerfile | 2 ++ bullseye/etc/entry.sh | 2 ++ bullseye/etc/server.cfg | 4 ++-- examples/docker-compose.yml | 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 09cdab5..72cae96 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,8 @@ TV_PORT=27020 (SourceTV/CSTV port to bind to) TV_AUTORECORD=0 (Automatically record all games as CSTV demos: 0=off, 1=on) TV_PW="changeme" (CSTV password for clients) TV_RELAY_PW="changeme" (CSTV password for relay proxies) +TV_SNAPSHOTRATE=32 (World snapshots to broadcast per second. Affects camera tickrate.) +TV_DELAY=0 (CSTV broadcast delay in seconds) ``` # Credits diff --git a/bullseye/Dockerfile b/bullseye/Dockerfile index 7ea93b3..05e2a8e 100644 --- a/bullseye/Dockerfile +++ b/bullseye/Dockerfile @@ -57,6 +57,8 @@ ENV CS2_SERVERNAME="cs2 private server" \ TV_PORT=27020 \ TV_PW="changeme" \ TV_RELAY_PW="changeme" \ + TV_SNAPSHOTRATE=32 \ + TV_DELAY=0 \ CS2_ADDITIONAL_ARGS="" # Set permissions on STEAMAPPDIR diff --git a/bullseye/etc/entry.sh b/bullseye/etc/entry.sh index 9c2a737..b12e62f 100644 --- a/bullseye/etc/entry.sh +++ b/bullseye/etc/entry.sh @@ -23,6 +23,8 @@ sed -i -e "s/{{SERVER_HOSTNAME}}/${CS2_SERVERNAME}/g" \ -e "s/{{TV_AUTORECORD}}/${TV_AUTORECORD}/g" \ -e "s/{{TV_PW}}/${TV_PW}/g" \ -e "s/{{TV_RELAY_PW}}/${TV_RELAY_PW}/g" \ + -e "s/{{TV_SNAPSHOTRATE}}/${TV_SNAPSHOTRATE}/g" \ + -e "s/{{TV_DELAY}}/${TV_DELAY}/g" \ "${STEAMAPPDIR}"/game/csgo/cfg/server.cfg # Rewrite Config Files diff --git a/bullseye/etc/server.cfg b/bullseye/etc/server.cfg index cf1a849..5bf7bfe 100644 --- a/bullseye/etc/server.cfg +++ b/bullseye/etc/server.cfg @@ -18,7 +18,7 @@ tv_autorecord {{TV_AUTORECORD}} // Automatically records all games as CSTV d tv_chatgroupsize 0 // Set the default chat group size tv_chattimelimit 8 // Limits spectators to chat only every n seconds tv_debug 0 // CSTV debug info. -tv_delay 30 // CSTV broadcast delay in seconds +tv_delay {{TV_DELAY}} // CSTV broadcast delay in seconds tv_delaymapchange 1 // Delays map change until broadcast is complete tv_deltacache 2 // Enable delta entity bit stream cache tv_dispatchmode 1 // Dispatch clients to relay proxies: 0=never, 1=if appropriate, 2=always @@ -31,7 +31,7 @@ tv_port {{TV_PORT}} // Host SourceTV port tv_password "{{TV_PW}}" // CSTV password for clients tv_relaypassword "{{TV_RELAY_PW}}" // CSTV password for relay proxies tv_relayvoice 1 // Relay voice data: 0=off, 1=on -tv_snapshotrate 24 // Snapshots broadcasted per second +tv_snapshotrate {{TV_SNAPSHOTRATE}} // Snapshots broadcasted per second tv_timeout 60 // CSTV connection timeout in seconds. tv_title "{{SERVER_HOSTNAME}} CSTV" // Set title for CSTV spectator UI tv_transmitall 1 // Transmit all entities (not only director view) diff --git a/examples/docker-compose.yml b/examples/docker-compose.yml index f536aee..b8bbbfc 100644 --- a/examples/docker-compose.yml +++ b/examples/docker-compose.yml @@ -34,6 +34,8 @@ services: - TV_PORT=27020 # Host SourceTV port - TV_PW=changeme # CSTV password for clients - TV_RELAY_PW=changeme # CSTV password for relay proxies + - TV_SNAPSHOTRATE=32 # World snapshots to broadcast per second. Affects camera tickrate. + - TV_DELAY=0 # CSTV broadcast delay in seconds volumes: - cs2:/home/steam/cs2-dedicated/ # (Change /mnt/cs2 according to your volume location) ports: