1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-25 21:38:59 +02:00

Remove condition that causes unintended behavior

This commit is contained in:
Dydzio 2023-01-11 23:32:24 +01:00 committed by Ivan Savenko
parent 3596d167a7
commit 8b2fc5198e

View File

@ -456,11 +456,8 @@ void CShowableAnim::blitImage(size_t frame, size_t group, SDL_Surface *to)
auto img = anim->getImage(frame, group);
if(img)
{
if(alpha != UINT8_MAX)
{
const ColorFilter alphaFilter = ColorFilter::genAlphaShifter(vstd::lerp(0.0f, 1.0f, alpha/255.0f));
img->adjustPalette(alphaFilter);
}
const ColorFilter alphaFilter = ColorFilter::genAlphaShifter(vstd::lerp(0.0f, 1.0f, alpha/255.0f));
img->adjustPalette(alphaFilter);
img->draw(to, pos.x, pos.y, &src);
}