From c6b87a9f44c2302989737aed3e212ee7b673053f Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Fri, 12 Jan 2024 15:41:45 +0100 Subject: [PATCH] move V_InitFlexTranTable() call to am_map.c --- src/am_map.c | 8 ++++++++ src/r_data.c | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/am_map.c b/src/am_map.c index 46d63fa0..817200f2 100644 --- a/src/am_map.c +++ b/src/am_map.c @@ -612,6 +612,8 @@ void AM_ResetScreenSize(void) // static void AM_LevelInit(void) { + static int precalc_once; + automapfirststart = true; f_x = f_y = 0; @@ -637,6 +639,12 @@ static void AM_LevelInit(void) scale_mtof = min_scale_mtof; scale_ftom = FixedDiv(FRACUNIT, scale_mtof); + + if (!precalc_once) + { + precalc_once = 1; + V_InitFlexTranTable(); + } } // diff --git a/src/r_data.c b/src/r_data.c index db0f783c..8c6c4cee 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -1020,7 +1020,6 @@ void R_InitData(void) R_InitSpriteLumps(); R_InitTranMap(1); // killough 2/21/98, 3/6/98 R_InitColormaps(); // killough 3/20/98 - V_InitFlexTranTable(); } //