From 0adb4eba090dfa5684b661a01ea9d67244fede75 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 11:46:40 +0100 Subject: Props: force colour inside prop DrawModel; no prop material tint The engine calls SetColorModulation(1,1,1) immediately before DrawModel, so the in-draw flag never sees it. Set the prop colour at the start of the prop DrawModel hook instead (colour only, not alpha), and stop applying ColorModulate to prop materials so only one mechanism touches props. --- src/studio.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/studio.cpp') diff --git a/src/studio.cpp b/src/studio.cpp index 110ce74..c4c3cfb 100644 --- a/src/studio.cpp +++ b/src/studio.cpp @@ -125,8 +125,12 @@ void hook_draw_model(void *self, void *results, void *info, void *bone, logf("studio: DrawModel model=\"%s\" prop=%d", model ? model : "?", (int)prop); } - if (prop) + if (prop) { + float c[4]; + prop_color(c); + g_orig_set_color(self, c); g_prop_depth++; + } g_orig_draw_model(self, results, info, bone, flex, flex_delayed, flags); if (prop) g_prop_depth--; -- cgit v1.2.3