engine: client: fix spray support for 24-bit BMP (save as miptex, not decal)

This commit is contained in:
Sergey Degtyar
2025-07-17 02:20:36 +05:00
committed by Alibek Omarov
parent 6111df486e
commit 0cce014c01
+2 -1
View File
@@ -140,7 +140,7 @@ qboolean CL_ConvertImageToWAD3( const char *filename )
if( !image )
return false;
if( is_bmp )
if( is_bmp && image->palette != NULL )
{
// copy bmp palette from rgba to rgb
for( i = 0; i < 256; ++i )
@@ -153,6 +153,7 @@ qboolean CL_ConvertImageToWAD3( const char *filename )
}
else
{
is_bmp = false;
quant = Image_Quantize( image );
if( !quant || !quant->buffer || !quant->palette )
goto cleanup;