diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-04 01:16:51 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-04 01:16:51 +0100 |
| commit | 76c88403d18ef01e8f15b89fcd6d09f0825a1bfc (patch) | |
| tree | 04049208055fb0533af01a46a2a96c2b9ce491a5 /build.sh | |
| parent | World tint: colour dynamic props through m_clrRender (diff) | |
| download | hl2h-76c88403d18ef01e8f15b89fcd6d09f0825a1bfc.tar.gz hl2h-76c88403d18ef01e8f15b89fcd6d09f0825a1bfc.zip | |
World tint: tint map-static props through IStudioRender
Most of the crates are prop_static, which have no client entity, so writing
m_clrRender only reached the three dynamic ones. Hook the StudioRender
interface (VStudioRender025) on the interface object's vtable: substitute the
prop colour in SetColorModulation/SetAlphaModulation while
DrawModelStaticProp is drawing a models/props model, and set the modulation
explicitly before the original draw in case the engine sets it just before the
call.
Vtable indices verified by disassembling CStudioRenderContext: 27 = three
float stores from the argument pointer, 28 = one float, 30 = the
DrawModelInfo_t-drawing entry with three arguments (the 2013 SDK header lists
these slots five positions earlier in this build).
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -3,6 +3,6 @@ set -e | |||
| 3 | cd "$(dirname "$0")" | 3 | cd "$(dirname "$0")" |
| 4 | g++ -m32 -O2 -std=c++17 -Wall -Wextra -Werror -fPIC -shared -fvisibility=hidden -fno-omit-frame-pointer \ | 4 | g++ -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/gui.cpp src/esp.cpp src/server.cpp src/bones.cpp src/vischeck.cpp src/world.cpp \ | 6 | src/hl2h.cpp src/modules.cpp src/cinput.cpp src/netvars.cpp src/menu.cpp src/gui.cpp src/esp.cpp src/server.cpp src/bones.cpp src/vischeck.cpp src/world.cpp src/studio.cpp \ |
| 7 | -ldl -Wl,--no-undefined | 7 | -ldl -Wl,--no-undefined |
| 8 | file libhl2hake.so | 8 | file libhl2hake.so |
