From 76c88403d18ef01e8f15b89fcd6d09f0825a1bfc Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 01:16:51 +0100 Subject: 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). --- src/hl2h.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/hl2h.h') diff --git a/src/hl2h.h b/src/hl2h.h index 779a241..3ccf7b5 100644 --- a/src/hl2h.h +++ b/src/hl2h.h @@ -298,6 +298,7 @@ void draw_text_col(int x, int y, const char *s, int r, int g, int b); void esp_draw(); void esp_draw_items(); void prop_tint_update(); +void studio_props_init(); bool world_to_screen(const Vector &w, float &sx, float &sy); void set_silent_restore(const QAngle &angles); bool is_visible(const Vector &eye, const Vector &point, -- cgit v1.2.3