From aa096fe6886681d3338573cd3af779b57a5b56ab Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 30 Aug 2026 03:32:59 +0200 Subject: init --- play.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 play.sh (limited to 'play.sh') diff --git a/play.sh b/play.sh new file mode 100755 index 0000000..3d791b0 --- /dev/null +++ b/play.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# Launch HL2 with hl2hake preloaded (through Steam's bundled 32-bit runtime). +# Extra args are passed to the game, e.g.: ./play.sh -windowed +map d1_trainstation_01 +set -e +GAME="$HOME/.local/share/Steam/steamapps/common/Half-Life 2" +LIB="$(cd "$(dirname "$0")" && pwd)/libhl2hake.so" + +if [ ! -f "$LIB" ]; then + echo "libhl2hake.so not found - run ./build.sh first" >&2 + exit 1 +fi + +export LD_PRELOAD="$LIB" +exec "$HOME/.steam/steam/ubuntu12_32/steam-runtime/run.sh" -- "$GAME/hl2.sh" -steam -novid -console "$@" -- cgit v1.2.3