From b94918988190b1b2491ae1e3149403d95966af3e Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Thu, 28 May 2026 16:32:48 +0300 Subject: [PATCH] Fix palette resolution The LayerProp palette lookup was gated on the *filter* attribute instead of the *palette* attribute -- the filter checks from the line above were copy-pasted verbatim. As a result, any LayerProp with an empty filter but a real palette never resolved its palette table: paletteTable stayed NULL and the layer fell back to the merc's shade table. The most visible victim is the heli fast-rope arrival layer (filter="" palette="hats"): rendered with the merc palette, the rope's pixel indices (45-81, 166-172) hit the merc's unreplaced orange/red glow ramp instead of the rope's own tan/green, painting orange specks along the rope. Testing the palette attribute restores the intended "hats" palette and the correct rope colours; it also fixes any other empty-filter layers. Co-Authored-By: Claude Opus 4.7 --- Tactical/LogicalBodyTypes/BodyTypeDB.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tactical/LogicalBodyTypes/BodyTypeDB.cpp b/Tactical/LogicalBodyTypes/BodyTypeDB.cpp index a4703993..5e496445 100644 --- a/Tactical/LogicalBodyTypes/BodyTypeDB.cpp +++ b/Tactical/LogicalBodyTypes/BodyTypeDB.cpp @@ -106,7 +106,7 @@ namespace LogicalBodyTypes { data->filter = FilterDB::Instance().FindFilter(aFilter); if (data->filter == NULL) throw XMLParseException("Unknown filter specified!", name, data->pParser); } - if (aPalette != NULL && strcmp(aFilter, "") != 0 && strcmp(aFilter, "default") != 0) { + if (aPalette != NULL && strcmp(aPalette, "") != 0 && strcmp(aPalette, "default") != 0) { data->paletteTable = PaletteDB::Instance().FindPaletteTable(aPalette); if (data->paletteTable == NULL) throw XMLParseException("Unknown palette specified!", name, data->pParser); }