From cce82e99d6d67d93acde911803df8402d4b2225f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 16 Dec 2018 19:03:04 +0100 Subject: [PATCH] - fixed: The texture compositor did not use a patch's translation. --- src/textures/formats/multipatchtexture.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/textures/formats/multipatchtexture.cpp b/src/textures/formats/multipatchtexture.cpp index 2bfc0fc40b..1514b1dea8 100644 --- a/src/textures/formats/multipatchtexture.cpp +++ b/src/textures/formats/multipatchtexture.cpp @@ -315,7 +315,8 @@ int FMultiPatchTexture::CopyPixels(FBitmap *bmp, int conversion) } } - FBitmap Pixels = Parts[i].Image->GetCachedBitmap(nullptr, conversion, &ret); + auto trans = Parts[i].Translation ? Parts[i].Translation->Palette : nullptr; + FBitmap Pixels = Parts[i].Image->GetCachedBitmap(trans, conversion, &ret); bmp->Blit(Parts[i].OriginX, Parts[i].OriginY, Pixels, &info); // treat -1 (i.e. unknown) as absolute. We have no idea if this may have overwritten previous info so a real check needs to be done. if (ret == -1) retv = ret;