summaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-27 15:49:54 +0100
committersalmonik <salmonik@tuta.io>2026-10-27 15:49:54 +0100
commit1dd3a4d504e98b8d18f236cb1df1fea366ddc36e (patch)
tree3beefbc8641ef409597cd2ee4e65f948338bfbbe /build.sh
parentSpread control: add server RandomSeed GOT diagnostic/override (diff)
downloadhl2h-1dd3a4d504e98b8d18f236cb1df1fea366ddc36e.tar.gz
hl2h-1dd3a4d504e98b8d18f236cb1df1fea366ddc36e.zip
Spread control: override the server FireBullets seed for the local player
The installed 2024 server ignores the client usercmd random_seed and uses its own shot seed. Force the server's CBaseEntity::FireBullets RandomSeed call for the local player only: - hook the server.so RandomSeed GOT slot (R_386_JUMP_SLOT at 0xce1348); - read the FireBullets `this` from the caller frame and compare it with the local server player base; - replace the seed with the precomputed best single/shotgun window and step it per pellet; NPC shots and everything else pass through. - client prediction still uses the same chosen usercmd seed, so both sides agree on the spread pattern.
Diffstat (limited to '')
-rwxr-xr-xbuild.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index 437f8c5..69dad99 100755
--- a/build.sh
+++ b/build.sh
@@ -1,7 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2set -e 2set -e
3cd "$(dirname "$0")" 3cd "$(dirname "$0")"
4g++ -m32 -O2 -std=c++17 -Wall -Wextra -Werror -fPIC -shared -fvisibility=hidden \ 4g++ -m32 -O2 -std=c++17 -Wall -Wextra -Werror -fPIC -shared -fvisibility=hidden -fno-omit-frame-pointer \
5 -o libhl2hake.so \ 5 -o libhl2hake.so \
6 src/hl2h.cpp src/modules.cpp src/cinput.cpp src/netvars.cpp src/menu.cpp src/esp.cpp src/server.cpp src/bones.cpp src/vischeck.cpp \ 6 src/hl2h.cpp src/modules.cpp src/cinput.cpp src/netvars.cpp src/menu.cpp src/esp.cpp src/server.cpp src/bones.cpp src/vischeck.cpp \
7 -ldl 7 -ldl