summaryrefslogtreecommitdiffstats
path: root/src/menu.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-04 18:43:28 +0100
committersalmonik <salmonik@tuta.io>2026-11-04 18:43:28 +0100
commitd7201a987ba6cc56fda3d3ea69275307385f7c3e (patch)
tree54d5247ac75adc3b9241c323dbc0ca5db5d35c96 /src/menu.cpp
parentChams: style flags on the resident debug material (diff)
downloadhl2h-d7201a987ba6cc56fda3d3ea69275307385f7c3e.tar.gz
hl2h-d7201a987ba6cc56fda3d3ea69275307385f7c3e.zip
Chams: preload style materials outside the model draw
FindMaterial inside DrawModelExecute did not load the style VMTs, so every style fell back to the solid material. Preload the six style materials from outer_draw (throttled) and have the render hook use the cached pointers only. world_find_material now returns only the exact requested material; the caller falls back to the solid style. Add a vgui/white probe and per-style preload logs.
Diffstat (limited to '')
-rw-r--r--src/menu.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/menu.cpp b/src/menu.cpp
index 376a779..6a3c607 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -999,6 +999,7 @@ void outer_draw() {
999 world_tint_update(); 999 world_tint_update();
1000 prop_tint_update(); 1000 prop_tint_update();
1001 fog_update(); 1001 fog_update();
1002 chams_preload();
1002 gui_handle_input(); 1003 gui_handle_input();
1003 // HL2H_DRAW_TEST=1 draws a probe rect without needing the GUI open 1004 // HL2H_DRAW_TEST=1 draws a probe rect without needing the GUI open
1004 static bool draw_test = getenv("HL2H_DRAW_TEST") != nullptr; 1005 static bool draw_test = getenv("HL2H_DRAW_TEST") != nullptr;