From cc06dab406a0086ddcb9e4ced3759614f65e069e Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 11:49:32 +0100 Subject: Props: remove studio diagnostics; document the prop tint path Drop the temporary DrawModel/SetColor logs now that the prop tint works, and document the IStudioRender hook layout, the short model-name format used for prop detection, the SetColor-before-DrawModel ordering, and why prop materials cannot be tinted directly. --- src/studio.cpp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src') diff --git a/src/studio.cpp b/src/studio.cpp index c4c3cfb..485b4fb 100644 --- a/src/studio.cpp +++ b/src/studio.cpp @@ -40,8 +40,6 @@ bool g_installed = false; int g_prop_depth = 0; int g_static_calls = 0; int g_static_props = 0; -int g_model_logs = 0; -int g_array_logs = 0; bool prop_tint_on() { return feature_active(FEAT_WORLD_TINT) && g_tint_prop_on; @@ -89,15 +87,7 @@ bool is_prop_model(const char *name) { strncmp(name, "props_", 6) == 0; } -int g_color_logs = 0; - void hook_set_color(void *self, const float *color) { - if (g_color_logs < 10) { - g_color_logs++; - logf("studio: SetColorModulation depth=%d color=%.2f,%.2f,%.2f", - g_prop_depth, color ? color[0] : 0.0f, color ? color[1] : 0.0f, - color ? color[2] : 0.0f); - } if (g_prop_depth > 0 && prop_tint_on()) { float c[4]; prop_color(c); @@ -120,11 +110,6 @@ void hook_draw_model(void *self, void *results, void *info, void *bone, void *flex, void *flex_delayed, int flags) { const char *model = info_model_name(info); bool prop = prop_tint_on() && is_prop_model(model); - if (g_model_logs < 10) { - g_model_logs++; - logf("studio: DrawModel model=\"%s\" prop=%d", model ? model : "?", - (int)prop); - } if (prop) { float c[4]; prop_color(c); @@ -140,11 +125,6 @@ void hook_draw_array(void *self, void *info, int count, void *instances, int stride, int flags) { const char *model = info_model_name(info); bool prop = prop_tint_on() && is_prop_model(model); - if (g_array_logs < 10) { - g_array_logs++; - logf("studio: DrawModelArray count=%d model=\"%s\" prop=%d", count, - model ? model : "?", (int)prop); - } if (prop) g_prop_depth++; g_orig_draw_array(self, info, count, instances, stride, flags); -- cgit v1.2.3