reinit minimap stuff when a wad is added while ingame

This commit is contained in:
Alug committed 2025-01-13 08:29:11 +01:00
1 parent 4103fac605
commit ab8cbcb450
2 files changed
+4 -3

No files matched your search

-1
View File
@@ -409,7 +409,6 @@ extern precipmobj_t **precipblocklinks; // special blockmap for precip rendering
extern struct minimapinfo
{
patch_t *minimap_pic;
UINT8 mapthingcount;
INT32 min_x, min_y;
INT32 max_x, max_y;
INT32 map_w, map_h;
+4 -2
View File
@@ -2507,8 +2507,6 @@ static void P_InitMinimapInfo(void)
if (lumpnum != -1)
minimapinfo.minimap_pic = W_CachePatchName(va("%sR", G_BuildMapName(gamemap)), PU_HUDGFX);
minimapinfo.mapthingcount = 0;
// TODO iterate over mapthings to look for possible user-defined bounds
minimapinfo.min_x = bsp->bbox[0][BOXLEFT];
minimapinfo.max_x = bsp->bbox[0][BOXRIGHT];
minimapinfo.min_y = bsp->bbox[0][BOXBOTTOM];
@@ -3229,6 +3227,10 @@ boolean P_MultiSetupWadFiles(boolean fullsetup)
ST_LoadGraphics();
ST_ReloadSkinFaceGraphics();
// reload minimap stuff while were in the map since it may get replaced otherwise
if (gamestate == GS_LEVEL)
P_InitMinimapInfo();
if (!partadd_important)
partadd_stage = -1; // everything done
else if (fullsetup)