From 40af058406ca680d42c2285e92a2e3ed4b463338 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 6 Jul 2024 22:29:55 +0300 Subject: [PATCH] engine: client: console: add conback.dds by request, don't fail on texture that cannot be loaded --- engine/client/console.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engine/client/console.c b/engine/client/console.c index a08fbe5a5..e7b3aee88 100644 --- a/engine/client/console.c +++ b/engine/client/console.c @@ -2136,6 +2136,7 @@ void Con_CharEvent( int key ) static int Con_LoadSimpleConback( const char *name, int flags ) { const char *paths[] = { + "gfx/shell/%s.dds", "gfx/shell/%s.bmp", "gfx/shell/%s.tga", "cached/%s640", @@ -2149,7 +2150,12 @@ static int Con_LoadSimpleConback( const char *name, int flags ) Q_snprintf( path, sizeof( path ), paths[i], name ); if( g_fsapi.FileExists( path, false )) - return ref.dllFuncs.GL_LoadTexture( path, NULL, 0, flags ); + { + int gl_texturenum = ref.dllFuncs.GL_LoadTexture( path, NULL, 0, flags ); + + if( gl_texturenum ) + return gl_texturenum; + } } return 0;