diff --git a/src/openrct2/drawing/Drawing.Sprite.cpp b/src/openrct2/drawing/Drawing.Sprite.cpp index 769a2b07b9..15dc25f17b 100644 --- a/src/openrct2/drawing/Drawing.Sprite.cpp +++ b/src/openrct2/drawing/Drawing.Sprite.cpp @@ -510,7 +510,7 @@ void FASTCALL gfx_bmp_sprite_to_buffer( uint8_t* FASTCALL gfx_draw_sprite_get_palette(ImageId imageId) { - if (imageId.IsRemap()) + if (!imageId.HasSecondary()) { uint8_t palette_ref = imageId.GetRemap(); if (!imageId.IsBlended()) @@ -529,7 +529,7 @@ uint8_t* FASTCALL gfx_draw_sprite_get_palette(ImageId imageId) return g1->offset; } } - else if (imageId.HasSecondary()) + else { uint8_t* palette_pointer = gPeepPalette; @@ -562,10 +562,6 @@ uint8_t* FASTCALL gfx_draw_sprite_get_palette(ImageId imageId) return palette_pointer; } - else - { - return nullptr; - } } void FASTCALL gfx_draw_sprite_software(rct_drawpixelinfo* dpi, ImageId imageId, int32_t x, int32_t y)