Skip to content

Commit 8e2da29

Browse files
committed
tr_image: extend internal image detection
1 parent a570f47 commit 8e2da29

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/engine/renderer/tr_image.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,11 +1819,20 @@ image_t *R_FindImageFile( const char *imageName, imageParams_t &imageParams )
18191819
}
18201820

18211821
// Built-in images can't be reloaded with different parameters, so return them as-is.
1822-
// For most of the usable ones e.g. _white, parameters wouldn't make a difference anyway.
1822+
// For most of the usable ones e.g. $white, parameters wouldn't make a difference anyway.
18231823
// HACK: detect built-in images by naming convention, though nothing stops users from using such names
1824-
if ( image->name[ 0 ] == '_' && !strchr( image->name, '/' ) )
1824+
switch ( image->name[ 0 ] )
18251825
{
1826-
return image;
1826+
case '_': // TODO: Remove once _fog is removed.
1827+
case '*':
1828+
case '$':
1829+
if ( !strchr( image->name, '/' ) )
1830+
{
1831+
return image;
1832+
}
1833+
break;
1834+
default:
1835+
break;
18271836
}
18281837

18291838
bool compatible = false;

0 commit comments

Comments
 (0)