From 0cce014c01f636f43f4395be0a5e608aa5e25629 Mon Sep 17 00:00:00 2001 From: Sergey Degtyar Date: Thu, 17 Jul 2025 00:11:59 +0300 Subject: [PATCH] engine: client: fix spray support for 24-bit BMP (save as miptex, not decal) --- engine/client/cl_spray.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/client/cl_spray.c b/engine/client/cl_spray.c index efdddeaa..c41c9d01 100644 --- a/engine/client/cl_spray.c +++ b/engine/client/cl_spray.c @@ -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;