From b6d204a88bc584d06391fbb545144c7b12253640 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 7 Jun 2020 13:50:41 +0200 Subject: [PATCH] - fixed: Weapons are part of the scene and always need to be rendered with the global base palette. --- source/build/src/engine.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/build/src/engine.cpp b/source/build/src/engine.cpp index eec8bc462..4b9aba8e2 100644 --- a/source/build/src/engine.cpp +++ b/source/build/src/engine.cpp @@ -3063,8 +3063,11 @@ void twod_rotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t pic dg.mTexture = pic ? pic : tileGetTexture(picnum); if (!dg.mTexture || !dg.mTexture->isValid()) return; // empty tile. - // todo: check for hires replacements - if (basepal == 0 && dapalnum == 0 && pic) dg.mTranslationId = 0; + // todo: check for hires replacements. + + // The weapon drawer needs to use the global base palette. + if (twod == &twodpsp) dg.mTranslationId = TRANSLATION(Translation_Remap + curbasepal, dapalnum); + else if (basepal == 0 && dapalnum == 0 && pic) dg.mTranslationId = 0; else dg.mTranslationId = TRANSLATION(Translation_Remap + basepal, dapalnum); dg.mVertCount = 4;