mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-25 01:12:39 +00:00
Always cache EMEMAP/SUPMAP in PU_HUDGFX tag
These particular patches need to be cached in K_LoadKartHUDGraphics, but caching them anywhere else with a different tag causes them to potentially be freed and then later use-after-freed during a Sealed Star run, causing a crash. Instead, let's cache them as PU_HUDGFX in all cases where they are used. Fixes KartKrew/Kart#1240
This commit is contained in:
parent
f4e023a38e
commit
20ea98d563
2 changed files with 3 additions and 3 deletions
|
|
@ -1295,7 +1295,7 @@ void F_GameEvaluationDrawer(void)
|
|||
|
||||
patch_t *empat = W_CachePatchName(
|
||||
(evaluationtype == EVAL_CHAOS) ? "EMEMAP" : "SUPMAP",
|
||||
PU_PATCH_LOWPRIORITY
|
||||
PU_HUDGFX
|
||||
);
|
||||
x -= 6*FRACUNIT;
|
||||
y -= 6*FRACUNIT;
|
||||
|
|
|
|||
|
|
@ -3098,7 +3098,7 @@ windataemeraldmaybe:
|
|||
colormap ? '\0' : 'B'
|
||||
);
|
||||
|
||||
V_DrawFixedPatch((rankx)*FRACUNIT, (ranky)*FRACUNIT, FRACUNIT, 0, W_CachePatchName(emname, PU_CACHE), colormap);
|
||||
V_DrawFixedPatch((rankx)*FRACUNIT, (ranky)*FRACUNIT, FRACUNIT, 0, W_CachePatchName(emname, PU_HUDGFX), colormap);
|
||||
}
|
||||
}
|
||||
else if (statsmode)
|
||||
|
|
@ -5414,7 +5414,7 @@ void M_DrawVideoModes(void)
|
|||
va("\x87" "Default mode is %dx%d",
|
||||
cv_scr_width.value, cv_scr_height.value));
|
||||
|
||||
|
||||
|
||||
|
||||
if (vid.width > 1280 || vid.height > 800)
|
||||
V_DrawCenteredMenuString(BASEVIDWIDTH/2 + t, currentMenu->y + 75+24,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue