Skip to content

Commit

Permalink
engine: client: remove spammy message about not precached model on cl…
Browse files Browse the repository at this point in the history
…ient 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.
  • Loading branch information
a1batross committed Jan 9, 2025
1 parent 0d55441 commit 07189ca
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions engine/client/cl_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down

0 comments on commit 07189ca

Please sign in to comment.