summaryrefslogtreecommitdiffstats
path: root/src/hl2h.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-03 23:21:13 +0100
committersalmonik <salmonik@tuta.io>2026-11-03 23:21:13 +0100
commit1f7c91905f69baba0aca8265c84deaba2ddac98a (patch)
tree9014a7e63e5531a05ff96c80a07ecccda927a533 /src/hl2h.cpp
parentRemove temporary crash-stage markers (diff)
downloadhl2h-1f7c91905f69baba0aca8265c84deaba2ddac98a.tar.gz
hl2h-1f7c91905f69baba0aca8265c84deaba2ddac98a.zip
World: add world/sky material colour modulation
Port Amalgam's modulation approach: obtain IMaterialSystem from the already loaded materialsystem.so (VMaterialSystem080) and walk materials with FirstMaterial/NextMaterial/GetMaterial. ColorModulate the "World textures" group (sky names excluded) and the "SkyBox textures"/sky-named group. The walk runs only when the enabled groups or colours change, restores white when disabled, and re-applies after level changes. Before touching materials, GetNumMaterials() and the first material's name/group are sanity-checked so a wrong vtable slot logs and aborts instead of walking garbage. GUI: "World tint" card with world/sky toggles and RGB sliders; config section [worldtint].
Diffstat (limited to '')
-rw-r--r--src/hl2h.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/hl2h.cpp b/src/hl2h.cpp
index 375cd5a..dfe4e57 100644
--- a/src/hl2h.cpp
+++ b/src/hl2h.cpp
@@ -584,6 +584,7 @@ static void do_move(int seq, float frametime) {
584 aimbot_reset_lock(); 584 aimbot_reset_lock();
585 silentaim_reset_lock(); 585 silentaim_reset_lock();
586 fullbright_invalidate(); 586 fullbright_invalidate();
587 world_tint_invalidate();
587 } 588 }
588 589
589 if (feature_active(FEAT_SPREAD)) { 590 if (feature_active(FEAT_SPREAD)) {