From 1f7c91905f69baba0aca8265c84deaba2ddac98a Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 3 Nov 2026 23:21:13 +0100 Subject: 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]. --- src/hl2h.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/hl2h.cpp') 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) { aimbot_reset_lock(); silentaim_reset_lock(); fullbright_invalidate(); + world_tint_invalidate(); } if (feature_active(FEAT_SPREAD)) { -- cgit v1.2.3