Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions sniper/etc/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ if [[ ! -z $CS2_BOT_QUOTA_MODE ]] ; then
sed -i "s/bot_quota_mode.*/bot_quota_mode ${CS2_BOT_QUOTA_MODE}/" "${STEAMAPPDIR}"/game/csgo/cfg/*
fi

# Rewrite tv_delay in all gamemode_*.cfg files
if [[ -n "$TV_DELAY" ]]; then
for f in "${STEAMAPPDIR}"/game/csgo/cfg/gamemode_*.cfg; do
[[ -e "$f" ]] || continue
grep -q "^tv_delay" "$f" \
&& sed -i "s/^tv_delay.*/tv_delay ${TV_DELAY}/" "$f" \
|| echo "tv_delay ${TV_DELAY}" >> "$f"
done
fi

# Switch to server directory
cd "${STEAMAPPDIR}/game/"

Expand Down
Loading