From 3b4fad16dbb42aed5b873ff14600417a0852b284 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Mon, 10 Jan 2022 21:23:55 +0100 Subject: [PATCH] P_WriteTextmap: Convert global colormaps --- src/p_setup.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/p_setup.c b/src/p_setup.c index 41384bc97..4f6c98ab0 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2057,16 +2057,18 @@ static void P_WriteTextmap(void) case 606: if (wlines[i].args[0] == MTAG_GLOBAL) { - CONS_Alert(CONS_WARNING, M_GetText("Linedef %d applies a global colormap which cannot be converted automatically. Please convert it manually.\n"), i); - break; + sector_t *sec = wlines[i].frontsector - sectors + wsectors; + sec->extra_colormap = wsides[wlines[i].sidenum[0]].colormap_data; } - - TAG_ITER_SECTORS(wlines[i].args[0], s) + else { - if (wsectors[s].colormap_protected) - continue; + TAG_ITER_SECTORS(wlines[i].args[0], s) + { + if (wsectors[s].colormap_protected) + continue; - wsectors[s].extra_colormap = wsides[wlines[i].sidenum[0]].colormap_data; + wsectors[s].extra_colormap = wsides[wlines[i].sidenum[0]].colormap_data; + } } break; default: