Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump version to 0.5 #2

Merged
merged 5 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
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
86 changes: 0 additions & 86 deletions .github/workflows/l4d2.yml

This file was deleted.

72 changes: 72 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: build

on:
workflow_dispatch:
push:
paths: pushbuild.txt

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [windows-2019, ubuntu-latest]
include:
- os: windows-2019
os_short: windows

- os: ubuntu-latest
os_short: linux
container_image: debian:10

name: build on ${{ matrix.os_short }}
runs-on: ${{ matrix.os }}
container: ${{ matrix.container_image }}

steps:
- name: Getting GITHUB_SHA_SHORT
shell: bash
run: |
echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV

- name: Install linux dependencies
if: ${{ matrix.os_short == 'linux' }}
shell: bash
run: |
apt update && apt install -y apt-transport-https lsb-release wget curl software-properties-common gnupg g++-multilib git make
bash <(curl -fsSL https://apt.llvm.org/llvm.sh) 18
ln -s /usr/bin/clang-18 /usr/bin/clang
ln -s /usr/bin/clang++-18 /usr/bin/clang++
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
echo "XMAKE_ROOT=y" >> $GITHUB_ENV

- name: Getting xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest

- name: Getting hl2sdk-l4d2
uses: actions/checkout@v4
with:
repository: alliedmodders/hl2sdk
ref: l4d2
path: hl2sdk-l4d2

- name: Getting own repository
uses: actions/checkout@v4
with:
path: src

- name: Compile ${{ github.event.repository.name }}
working-directory: src
run: |
xmake f --HL2SDKPATH=../hl2sdk-l4d2
xmake -rv l4dtoolz

- name: Uploading package
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-${{ matrix.os_short }}-${{ env.GITHUB_SHA_SHORT }}
path: src/release

12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
.vscode/
release/
/.cache
/.xmake
/build
/compile_commands.json
/release
hl2sdk*
.vscode
test.*
test
core
40 changes: 12 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,36 @@
## About
Valve server plugin, unlock the max players limit and tickrate limit on L4D2. Make sure you have deleted the other versions of `l4dtoolz` and `tickrate_enabler` before using.
Valve server plugin, unlock the max players limit and tickrate limit on L4D2. Make sure you have deleted the other versions of **l4dtoolz** and **tickrate_enabler** before using.

- `-tickrate`: Command Line Options, Set the game's tickrate. default value is 30.
- `-maxplayers`: Command Line Options, Set the maxplayers (bot and human players), default value is 31.
- `sv_maxplayers`: Console Variables, Set the max human players allowed to join the server. when the lobby is full, you still need to remove the lobby reservation and set `sv_allow_lobby_connect_only 0`
- `sv_lobby_unreserve`: Console Commands, Set lobby reservation cookie to 0.
- `-tickrate`: Command Line Options, Set the game's tickrate. default value is 30.

## Build manually

Debian:
```shell
dpkg --add-architecture i386
apt update
apt install -y clang g++-multilib git make
```bash
## Debian as an example.
apt update && apt install -y clang g++-multilib wget git make

export CC=clang && export CXX=clang++
wget https://xmake.io/shget.text -O - | bash

mkdir temp && cd temp
git clone --depth=1 -b l4d2 --recurse-submodules https://github.com/alliedmodders/hl2sdk hl2sdk-l4d2
git clone --depth=1 https://github.com/fdxx/l4dtoolz

cd l4dtoolz
make -f makefile_linux all
## Check the l4dtoolz/release folder.
```

Windows:

- Download [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/).
- Double-click the installation package, install Desktop development with C++, Make sure tools like MSVC are checked.
- From the start menu find `x86 Native Tools Command Prompt for VS` to open the command prompt window.
xmake f --HL2SDKPATH=../hl2sdk-l4d2
xmake -rv l4dtoolz

```shell
## Create a folder on the desktop, and then use the `cd` command to enter the folder

git clone --depth=1 -b l4d2 --recurse-submodules https://github.com/alliedmodders/hl2sdk hl2sdk-l4d2
git clone --depth=1 https://github.com/fdxx/l4dtoolz

cd l4dtoolz
nmake -f makefile_windows all
## Check the l4dtoolz/release folder.
```

## Related plugins (used together with this plugin)
- [l4d2_tick_network_tweaks](https://github.com/fdxx/l4d2_plugins/blob/main/l4d2_tick_network_tweaks.sp) : Tweaks server related network parameters to cooperate high tickrate.
- [l4d2_lobby_match_manager](https://github.com/fdxx/l4d2_plugins/blob/main/l4d2_lobby_match_manager.sp) : Auto unreserve when lobby full. and other lobby reservation related modifications.

- [l4d2_tick_network_tweaks](https://github.com/fdxx/l4d2_plugins) : Tweaks server related network parameters to cooperate high tickrate.
- [l4d2_lobby_match_manager](https://github.com/fdxx/l4d2_plugins) : Auto unreserve when lobby full. and other lobby reservation related modifications.

## Credits

- Original `l4dtoolz` plugin and other forked versions
- Original `tickrate_enabler` plugin and other forked versions
- [AlliedModders](https://github.com/alliedmodders)
Expand Down
Loading