From 07189ca2f58d8eca2010744f0f9befbe5b2faf92 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 9 Jan 2025 17:07:09 +0300 Subject: [PATCH] engine: client: remove spammy message about not precached model on client side Recently, mods (Brutal Half-Life v3 and MMod) started to call this function every frame as a hacky way to detect presence of some model on the level. I don't know why they do that, but users (who co-incidentally run engine with -dev) has been complaining about console spam. This is why we can't have things. --- engine/client/cl_game.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/engine/client/cl_game.c b/engine/client/cl_game.c index f67f565520..c08cb0c499 100644 --- a/engine/client/cl_game.c +++ b/engine/client/cl_game.c @@ -2408,9 +2408,8 @@ CL_FindModelIndex */ static int GAME_EXPORT CL_FindModelIndex( const char *m ) { - char filepath[MAX_QPATH]; - static float lasttimewarn; - int i; + char filepath[MAX_QPATH]; + int i; if( !COM_CheckString( m )) return 0; @@ -2427,13 +2426,6 @@ static int GAME_EXPORT CL_FindModelIndex( const char *m ) return i+1; } - if( lasttimewarn < host.realtime ) - { - // tell user about problem (but don't spam console) - Con_DPrintf( S_ERROR "Could not find index for model %s: not precached\n", filepath ); - lasttimewarn = host.realtime + 1.0f; - } - return 0; }